@ixjb94/indicators v1.2.2
Supports
Browser, ES6, CommonJS
About
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.
Tests (Jest)
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
Comparison with TradingView (EMA 10)
Benchmark
Installation
npm install @ixjb94/indicators
Usage NodeJS
import { Indicators } from "@ixjb94/indicators"
// OR
const { Indicators } = require("@ixjb94/indicators")
Usage Browser
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
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
.
Examples
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)
Types & Intellisense & Browser Support
Indicators
ā
= 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 | ā |
crossover | Crossover | ā |
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 | ā |
Icon by
https://www.flaticon.com/free-icon/bar-graph_3501061
Author: Freepik
Website: https://www.freepik.com
https://www.flaticon.com/authors/freepik
11 days ago
12 days ago
3 months ago
3 months ago
3 months ago
3 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago