Skip to content

Fastest Technical Indicators written in JavaScript, Supports: Browser, NodeJS, ES6, CommonJS, Bun, Svelte, React, Angular, etc. More than +100 indicators(SMA, EMA, RSI, MACD, ...)

License

Notifications You must be signed in to change notification settings

ixjb94/indicators-js

Repository files navigation

CodeFactor npm version npm downloads

About

Fastest Technical Indicators written in JavaScript

  • Zero Dependencies
  • No Internal Function Calls
  • Lightweight: +100 Indicators only ~30kb

There is also an older version written in TypeScript.

Supports

Browser, ES6, CommonJS, NodeJS, Bun, Svelte, React, Angular, etc.

Installation

npm install @ixjb94/indicators-js

Examples

NodeJS, Bun, React, Svelte, Angular, etc.

import { ema } from "@ixjb94/indicators-js"
// or
const { ema } = require("@ixjb94/indicators-js")

const source = [1,2,3,4,5]
const result = ema(source, 3)

Browser - Option 1

<script src="./node_modules/@ixjb94/indicators-js/dist/index.umd.js"></script>
<script>
    const { ema } = window.indicators
    const result = ema([1,2,3,4,5], 3)
    console.log(result)
</script>

Browser - Option 2 - use the Indicators you need

<script src="./node_modules/@ixjb94/indicators-js/core/ema.js"></script>
<script src="./node_modules/@ixjb94/indicators-js/core/rsi.js"></script>
<!-- etc -->
<script>
    /**
     * window.ema OR ema
     * window.rsi OR rsi
     * window.sma OR sma
     * ...
     * */

    const source = [1,2,3,4,5,6]

    const myEMA = ema(source, 3)
    const myRSI = rsi(source, 4)

    console.log(myEMA)
    console.log(myRSI)
</script>

Browser - Option 3 - Using CDN

<!-- All 30kb file -->
<script src="https://unpkg.com/@ixjb94/indicators-js@latest/dist/index.umd.js"></script>

<!-- Singles -->
<script src="https://unpkg.com/@ixjb94/indicators-js@latest/core/ema.js"></script>
<script src="https://unpkg.com/@ixjb94/indicators-js@latest/core/rsi.js"></script>

Vite Vanilla: same as Svelte, React, etc.

Indicators

βœ… = Available and fastest
❌ = Indicator is not available
πŸ”„ = Developing...
Compared to:
node-talib, tulipnode, technicalindicators, pandas_ta

Identifier Indicator Name @ixjb94/indicators-js
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 βœ…
dc Donchian Channels βœ…πŸ”„
fi Force index βœ…
kc Keltner Channels βœ…
kst Know Sure Thing βœ…
pbands βœ…
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 βœ…

About

Fastest Technical Indicators written in JavaScript, Supports: Browser, NodeJS, ES6, CommonJS, Bun, Svelte, React, Angular, etc. More than +100 indicators(SMA, EMA, RSI, MACD, ...)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published