1.0.49 • Published 3 years ago

ta-math v1.0.49

Weekly downloads
114
License
MIT
Repository
github
Last release
3 years ago

Technical analysis math bundlephobia Codecov Total alerts

Library for calculating technical indicators and overlays. You can choose format of price data from provider and library will return result. It distributed with Typescript, ES6 and ES5.

btc-with-bollinger-bands

Check example with plotly library, ccxt data provider and BTC prices from Binance exchange.

Technical Overlays

FunctionTechnical OverlayTestedDeveloped byYear
bbBollinger Band✔️️John Bollinger1980s
demaDouble Exponential Moving Average️ ✔️️Patrick Mulloy1994
emaExponential Moving Average✔️️
ebbExponential Bollinger Band✔️️Based on Welford's
keltnerKeltner Channels✔️️Chester Keltner1960
psarParabolic SAR:suspect:Welles Wilder1978
smaSimple Moving Average✔️️
temaTriple Exponential Moving Average️ ✔️️Patrick Mulloy1994
vbpVolume by Price✔️️
vwapVolume Weighted Average Price✔️️James Elkins1984
zigzagZigZag Indicator✔️️Arthur Merrill1977

Technical Indicators

FunctionTechnical IndicatorTestedDeveloped byYear
adlAccumulation / Distribution line✔️Marc Chaikin1970s
atrAverage True Range✔️Welles Wilder1978
adxAverage Directional Index✔️Welles Wilder1978
bbpBollinger Bands Percent Bandwidth %B👌
cciCommodity Channel Index✔️Donald Lambert1980
choChaikin Oscillator👌Marc Chaikin
expdevExponential Weighted Deviation✔️
fiForce Index✔️
kstKnow Sure Thing✔️
macdMoving Average Convergence/Divergence✔️Gerald Appel1979
madevMean Absolute Deviation✔️
mfiMoney Flow Index (volume-weighted RSI)✔️Gene Quong and Avrum Soudack1989
obvOn Balance Volume✔️Joseph Granville1963
rocRate-of-Change✔️
rsiRelative Strength Index✔️Welles Wilder1978
stdevStandard Deviation✔️️
stochStochastic Oscillator (Slow/Fast/Full)✔️George Lane1950s
stochRsiCombines Stochastics with the RSI✔️Welles Wilder1994
viVortex Indicator✔️Etienne Botes and Douglas Siepman2010
williamsWilliams %R✔️

Error methods

FunctionError methodsTested
maeMean Absolute Error✔️
mapeMean Absulute Percentage Error✔️
nrmseNormalized Root-Mean-Square Error✔️
rmseRoot-Mean-Square Error✔️

Price transformations

FunctionPrice transformationTested
trueRangeTrue Range✔️
typicalPriceTypical Price✔️

Statistical methods

FunctionStatistical methodsTested
covCovariation✔️
corCorrelation✔️
meanMean (Average)✔️
sdStandard deviation✔️

Correlation matrix

correlation-matrix

Usage

  const ohlcv = [[t,o,h,l,c,v], [t2,o2,h2,l2,c2,v2],  ...  ,[tN,oN,hN,lN,cN,vN]];
  const ta = new TA(ohlcv, TA.exchangeFormat);
  const emaShort = ta.ema(10);
  const emaLong = ta.ema(21);
  const bband = ta.bb(15, 2);
  const bbUpper = bband.upper;
  const bbLower = bband.lower;
  const smaOpenPrice = TA.sma(ta.$open);

Installation

Install npm package npm i ta-math or add ta-math.js script file on web page.

2do list

  • basic indicators and overlays
  • unit tests
  • es5 with babel
  • coverage
  • good looking example
  • migrate to typescript
  • fix PSAR

Contributing

Feel free to contribute. Here reference how to implement new indicators. There are test samples in the .xls files, also you can generate testing data with 'generator.py' file. To convert columns into rows in .xls you can use this tool.

1.0.44

3 years ago

1.0.48

3 years ago

1.0.47

3 years ago

1.0.46

3 years ago

1.0.45

3 years ago

1.0.49

3 years ago

1.0.43

3 years ago

1.0.42

3 years ago

1.0.41

3 years ago

1.0.39

3 years ago

1.0.38

3 years ago

1.0.40

3 years ago

1.0.37

3 years ago

1.0.36

3 years ago

1.0.35

3 years ago

1.0.33

3 years ago

1.0.34

3 years ago

1.0.32

3 years ago

1.0.31

4 years ago

1.0.30

4 years ago

1.0.29

4 years ago

1.0.28

4 years ago

1.0.27

4 years ago

1.0.26

4 years ago

1.0.25

4 years ago

1.0.24

4 years ago

1.0.23

4 years ago

1.0.22

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.9

4 years ago

1.0.10

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.4.64

4 years ago

0.4.62

4 years ago

0.4.63

4 years ago

0.4.60

4 years ago

0.4.61

4 years ago

0.4.59

4 years ago

0.4.57

4 years ago

0.4.58

4 years ago

0.4.56

4 years ago

0.4.55

4 years ago

0.4.53

4 years ago

0.4.54

4 years ago

0.4.52

4 years ago

0.4.51

4 years ago

0.4.50

4 years ago

0.4.49

4 years ago

0.4.48

4 years ago

0.4.47

4 years ago

0.4.46

4 years ago

0.4.45

4 years ago

0.4.44

4 years ago

0.4.43

4 years ago

0.4.42

4 years ago

0.4.41

4 years ago

0.4.40

4 years ago

0.4.39

4 years ago

0.4.38

4 years ago

0.4.37

4 years ago

0.4.36

4 years ago

0.4.35

4 years ago

0.4.33

4 years ago

0.4.34

4 years ago

0.4.32

4 years ago

0.4.31

4 years ago

0.4.30

4 years ago

0.4.29

4 years ago

0.4.28

4 years ago

0.4.27

4 years ago

0.4.26

4 years ago

0.4.25

4 years ago

0.4.24

4 years ago

0.4.23

4 years ago

0.4.22

4 years ago

0.4.20

4 years ago

0.4.21

4 years ago

0.4.19

4 years ago

0.4.18

4 years ago

0.4.17

4 years ago

0.4.16

4 years ago

0.4.15

4 years ago

0.4.14

4 years ago

0.4.13

4 years ago

0.4.12

4 years ago

0.4.10

4 years ago

0.4.11

4 years ago

0.4.9

4 years ago

0.4.8

4 years ago

0.4.7

4 years ago

0.4.5

4 years ago

0.4.4

4 years ago

0.4.3

4 years ago

0.4.2

4 years ago

1.0.50

4 years ago

0.3.50

4 years ago

0.3.49

4 years ago

0.3.48

4 years ago

0.3.47

4 years ago

0.3.46

4 years ago

0.3.45

4 years ago

0.3.44

4 years ago

0.3.43

4 years ago

0.3.42

4 years ago

0.3.41

4 years ago

0.3.40

4 years ago

0.3.39

4 years ago

0.3.38

4 years ago

0.3.37

4 years ago

0.3.36

4 years ago

0.3.35

4 years ago

0.3.34

4 years ago

0.3.33

4 years ago

0.3.32

4 years ago

0.3.31

4 years ago

0.3.30

4 years ago

0.3.29

4 years ago

0.3.28

4 years ago

0.3.27

4 years ago

0.3.26

5 years ago

0.3.25

5 years ago

0.3.24

5 years ago

0.3.23

5 years ago

0.3.22

5 years ago

0.3.21

5 years ago

0.3.20

5 years ago

0.3.19

5 years ago

0.3.18

5 years ago

0.3.17

5 years ago

0.3.16

5 years ago

0.3.15

5 years ago

0.3.14

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.13

5 years ago

0.3.12

5 years ago

0.3.11

5 years ago

0.3.10

5 years ago

0.3.9

6 years ago

0.3.8

6 years ago

0.3.7

6 years ago

0.3.6

6 years ago

0.3.5

6 years ago

0.3.3

6 years ago

0.3.1

6 years ago

0.2.7

6 years ago

0.2.6

6 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.2

6 years ago

0.2.3

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago