1.2.2 ā€¢ Published 11 days ago

@ixjb94/indicators v1.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
11 days ago

CodeFactor npm version npm size npm downloads last commit

logo

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
Tests

Comparison with TradingView (EMA 10)

Indicators Data Test

Benchmark

See full Benchmark info

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

types browser

Indicators

āœ… = Available and fastest
āŒ = Indicator is not available
šŸ”„ = Developing...
Compared to:
node-talib, tulipnode, technicalindicators, pandas_ta

IdentifierIndicator Name@ixjb94/indicators
adAccumulation/Distribution Lineāœ…
adoscAccumulation/Distribution Oscillatorāœ…
adxAverage Directional Movement Indexāœ…
adxrAverage Directional Movement Ratingāœ…
aoAwesome Oscillatorāœ…
apoAbsolute Price Oscillatorāœ…
aroonAroonāœ…
aroonoscAroon Oscillatorāœ…
atrAverage True Rangeāœ…
avgpriceAverage Priceāœ…
bbandsBollinger Bandsāœ…
bopBalance of Powerāœ…
cciCommodity Channel Indexāœ…
cmoChande Momentum Oscillatorāœ…
crossanyCrossanyāœ…
crossoverCrossoverāœ…
crossoverCrossoverāœ…
crossOverNumberCrossover a numberāœ…
crossUnderNumberCrossunder a numberāœ…
cviChaikins Volatilityāœ…
decayLinear Decayāœ…
demaDouble Exponential Moving Averageāœ…
diDirectional Indicatorāœ…
dmDirectional Movementāœ…
dpoDetrended Price Oscillatorāœ…
dxDirectional Movement Indexāœ…
edecayExponential Decayāœ…
emaExponential Moving Averageāœ…
emvEase of Movementāœ…
fisherFisher Transformāœ…
foscForecast Oscillatorāœ…
hmaHull Moving Averageāœ…
kamaKaufman Adaptive Moving Averageāœ…
kvoKlinger Volume Oscillatorāœ…
lagLagāœ…
linregLinear Regressionāœ…
linreginterceptLinear Regression Interceptāœ…
linregslopeLinear Regression Slopeāœ…
macdMoving Average Convergence/Divergenceāœ…
marketfiMarket Facilitation Indexāœ…
massMass Indexāœ…
maxMaximum In Periodāœ…
mdMean Deviation Over Periodāœ…
medpriceMedian Priceāœ…
mfiMoney Flow Indexāœ…
minMinimum In Periodāœ…
momMomentumāœ…
natrNormalized Average True Rangeāœ…
nviNegative Volume Indexāœ…
obvOn Balance Volumeāœ…
ppoPercentage Price Oscillatorāœ…
psarParabolic SARāœ…
pviPositive Volume Indexāœ…
qstickQstickāœ…
rocRate of Changeāœ…
rocrRate of Change Ratioāœ…
rsiRelative Strength Indexāœ…
smaSimple Moving Averageāœ…
stddevStandard Deviation Over Periodāœ…
stderrStandard Error Over Periodāœ…
stochStochastic Oscillatorāœ…
stochrsiStochastic RSIāœ…
sumSum Over Periodāœ…
temaTriple Exponential Moving Averageāœ…
trTrue Rangeāœ…
trimaTriangular Moving Averageāœ…
trixTrixāœ…
tsfTime Series Forecastāœ…
typpriceTypical Priceāœ…
ultoscUltimate Oscillatorāœ…
varVariance Over Periodāœ…
vhfVertical Horizontal Filterāœ…
vidyaVariable Index Dynamic Averageāœ…
volatilityAnnualized Historical Volatilityāœ…
voscVolume Oscillatorāœ…
vwmaVolume Weighted Moving Averageāœ…
wadWilliams Accumulation/Distributionāœ…
wcpriceWeighted Close Priceāœ…
wildersWilders Smoothingāœ…
willrWilliams %Rāœ…
wmaWeighted Moving Averageāœ…
zlemaZero-Lag Exponential Moving Averageāœ…
abandsāœ…
almaArnaud Legoux Moving Averageāœ…
ceChandelier Exitāœ…
cmfChaikin money flowāœ…
coppCoppock CurveāŒ
dcDonchian Channelsāœ…šŸ”„
fiForce indexāœ…
ikhtsāŒ
kcKeltner Channelsāœ…
kstKnow Sure Thingāœ…
mamaMESA Adaptive Moving AverageāŒ
pbandsāœ…
pcāŒ
pfePolarized Fractal Efficiencyāœ…
poscāœ…
rmiRelative Momentum Indexāœ…
rmtaRecursive Moving Trend Averageāœ…
rviRelative Vigor Indexāœ…
smiStochastic Momentum Indexāœ…
tsiTrue Strength Indexāœ…
vwapVolume-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
1.2.2

11 days ago

1.2.1

12 days ago

1.1.34

3 months ago

1.1.33

3 months ago

1.1.37

3 months ago

1.1.36

3 months ago

1.1.29

5 months ago

1.1.30

5 months ago

1.1.31

5 months ago

1.1.23

5 months ago

1.1.26

5 months ago

1.1.25

5 months ago

1.1.24

5 months ago

1.1.22

12 months ago

1.1.16

1 year ago

1.1.15

1 year ago

1.1.14

1 year ago

1.1.13

1 year ago

1.1.17

1 year ago

1.0.19

1 year ago

1.1.0

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.2

1 year ago

1.1.12

1 year ago

1.0.22

1 year ago

1.1.11

1 year ago

1.0.21

1 year ago

1.1.10

1 year ago

1.0.20

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago