Browser, ES6, CommonJS, NodeJS, Bun
Fastest Technical Indicators written in TypeScript
- Zero Dependencies: @ixjb94/Indicators is built from the ground up to be self-contained, with no external dependencies.
- No Internal Function Calls: Each Method in the library operates independently.
All of the indicators data have been tested with TradingView data and other Libraries.
You can find few in ./tests folder.
(Or you can run: npm test)
Note: All data have been tested with at least last 3 (tail) of TradingView's data.
Data Window: DOGEUSDT-4h-2023-10 (October)
Data Source: Binance Futures ::: Binance Vision
npm install @ixjb94/indicators
import { Indicators } from "@ixjb94/indicators"
// OR
const { Indicators } = require("@ixjb94/indicators")
index.html example:
<!DOCTYPE html>
<html lang="en">
<head>
<title>My Indicators</title>
</head>
<body>
<!--
PLEASE NOTE: you probably just need one of these
- browser.js
- browser-indicators.js
- browser-indicatorsNormalized.js
- browser-indicators-sync.js
- browser-indicatorsNormalized-sync.js
-->
<!-- all versions -->
<script src="./node_modules/@ixjb94/indicators/dist/browser.js"></script>
<!-- indicators -->
<script src="./node_modules/@ixjb94/indicators/dist/browser-indicators.js"></script>
<!-- normalized indicators -->
<script src="./node_modules/@ixjb94/indicators/dist/browser-indicatorsNormalized.js"></script>
<!-- sync indicators -->
<script src="./node_modules/@ixjb94/indicators/dist/browser-indicators-sync.js"></script>
<!-- sync normalized indocators -->
<script src="./node_modules/@ixjb94/indicators/dist/browser-indicatorsNormalized-sync.js"></script>
<script>
const library = indicators
const ta = new library.Indicators()
ta.ema(close, 20).then(data => console.log(data))
</script>
</body>
</html>
Note: you can move files from node_modules to somewhere else you want to like dist, public, etc.
OR you can use unpkg:
https://unpkg.com/@ixjb94/indicators@latest/dist/browser.js
https://unpkg.com/@ixjb94/indicators@latest/dist/browser-indicators.js
https://unpkg.com/@ixjb94/indicators@latest/dist/browser-indicatorsNormalized.js
https://unpkg.com/@ixjb94/indicators@latest/dist/browser-indicators-sync.js
https://unpkg.com/@ixjb94/indicators@latest/dist/browser-indicatorsNormalized-sync.js
Indicators consists of these classes:
1- Indicators: new Indicators()
2- IndicatorsNormalized: new IndicatorsNormalized()
3- IndicatorsSync: new IndicatorsSync()
4- IndicatorsNormalizedSync: new IndicatorsNormalizedSync()
Q: What is the difference between Indicators
and IndicatorsNormalized
?
A: IndicatorsNormalized
will fill the gap for you, example (SMA 3 with 5 closes):
[NaN, NaN, 1, 2, 3]
But the Indicators
will give you the SMA3 with 5 closes like this:
[1, 2, 3]
Note: Please note that the performance between IndicatorsNormalized
and Indicators
are the same,
so it's better to use IndicatorsNormalized
.
Note: Everything isPromised
so you need to do .then
or await
unless you use Sync
versions.
let ta = new Indicators()
ta.sma(close, 20)
ta.rsi(close, 14)
โ
= Available and fastest
โ = Indicator is not available
๐ = Developing...
Compared to:
node-talib, tulipnode, technicalindicators, pandas_ta
Identifier | Indicator Name | @ixjb94/indicators |
---|---|---|
ad | Accumulation/Distribution Line | โ |
adosc | Accumulation/Distribution Oscillator | โ |
adx | Average Directional Movement Index | โ |
adxr | Average Directional Movement Rating | โ |
ao | Awesome Oscillator | โ |
apo | Absolute Price Oscillator | โ |
aroon | Aroon | โ |
aroonosc | Aroon Oscillator | โ |
atr | Average True Range | โ |
avgprice | Average Price | โ |
bbands | Bollinger Bands | โ |
bop | Balance of Power | โ |
cci | Commodity Channel Index | โ |
cmo | Chande Momentum Oscillator | โ |
crossany | Crossany | โ |
crossover | Crossover | โ |
crossunder | Crossunder | โ |
crossOverNumber | Crossover a number | โ |
crossUnderNumber | Crossunder a number | โ |
cvi | Chaikins Volatility | โ |
decay | Linear Decay | โ |
dema | Double Exponential Moving Average | โ |
di | Directional Indicator | โ |
dm | Directional Movement | โ |
dpo | Detrended Price Oscillator | โ |
dx | Directional Movement Index | โ |
edecay | Exponential Decay | โ |
ema | Exponential Moving Average | โ |
emv | Ease of Movement | โ |
fisher | Fisher Transform | โ |
fosc | Forecast Oscillator | โ |
hma | Hull Moving Average | โ |
kama | Kaufman Adaptive Moving Average | โ |
kvo | Klinger Volume Oscillator | โ |
lag | Lag | โ |
linreg | Linear Regression | โ |
linregintercept | Linear Regression Intercept | โ |
linregslope | Linear Regression Slope | โ |
macd | Moving Average Convergence/Divergence | โ |
marketfi | Market Facilitation Index | โ |
mass | Mass Index | โ |
max | Maximum In Period | โ |
md | Mean Deviation Over Period | โ |
medprice | Median Price | โ |
mfi | Money Flow Index | โ |
min | Minimum In Period | โ |
mom | Momentum | โ |
natr | Normalized Average True Range | โ |
nvi | Negative Volume Index | โ |
obv | On Balance Volume | โ |
ppo | Percentage Price Oscillator | โ |
psar | Parabolic SAR | โ |
pvi | Positive Volume Index | โ |
qstick | Qstick | โ |
roc | Rate of Change | โ |
rocr | Rate of Change Ratio | โ |
rsi | Relative Strength Index | โ |
sma | Simple Moving Average | โ |
stddev | Standard Deviation Over Period | โ |
stderr | Standard Error Over Period | โ |
stoch | Stochastic Oscillator | โ |
stochrsi | Stochastic RSI | โ |
sum | Sum Over Period | โ |
tema | Triple Exponential Moving Average | โ |
tr | True Range | โ |
trima | Triangular Moving Average | โ |
trix | Trix | โ |
tsf | Time Series Forecast | โ |
typprice | Typical Price | โ |
ultosc | Ultimate Oscillator | โ |
var | Variance Over Period | โ |
vhf | Vertical Horizontal Filter | โ |
vidya | Variable Index Dynamic Average | โ |
volatility | Annualized Historical Volatility | โ |
vosc | Volume Oscillator | โ |
vwma | Volume Weighted Moving Average | โ |
wad | Williams Accumulation/Distribution | โ |
wcprice | Weighted Close Price | โ |
wilders | Wilders Smoothing | โ |
willr | Williams %R | โ |
wma | Weighted Moving Average | โ |
zlema | Zero-Lag Exponential Moving Average | โ |
abands | โ | |
alma | Arnaud Legoux Moving Average | โ |
ce | Chandelier Exit | โ |
cmf | Chaikin money flow | โ |
copp | Coppock Curve | โ |
dc | Donchian Channels | โ ๐ |
fi | Force index | โ |
ikhts | โ | |
kc | Keltner Channels | โ |
kst | Know Sure Thing | โ |
mama | MESA Adaptive Moving Average | โ |
pbands | โ | |
pc | โ | |
pfe | Polarized Fractal Efficiency | โ |
posc | โ | |
rmi | Relative Momentum Index | โ |
rmta | Recursive Moving Trend Average | โ |
rvi | Relative Vigor Index | โ |
smi | Stochastic Momentum Index | โ |
tsi | True Strength Index | โ |
vwap | Volume-Weighted Average Price | โ |
https://www.flaticon.com/free-icon/bar-graph_3501061
Author: Freepik
Website: https://www.freepik.com
https://www.flaticon.com/authors/freepik