debut-js / Indicators

Technical indicators for cryptocurrencies, stocks and forex. To work with historical and real price data. One of the most efficient Javascript library implementations. The library has such indicators as: Relative Strength Index (RSI), Moving Average C / D (MACD), Average Directional Index (ADX), Stochastic Oscillator, Bollinger Bands, Average True Range (ATR) and many others

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

momentValue undefined on period-matching count

cluxig opened this issue · comments

commented

Create SMA(10) and add 9 numbers, using nextValue(). Now the 10th value is added via momentValue(). Currently, this leads to undefined, which is also proven by code review.

The 10th added momentValue() must result in a "momentally" of the 10th next-value pendant. Only after the SMA (and other indicators) are lifted over their undefined states, incoming moment-values are suitable.