cinar / indicatorts

IndicatorTS - Stock technical indicators and strategies in TypeScript for browser and server programs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RSI returns `NaN` array

vivekmiyani opened this issue · comments

commented

Describe the bug

customRsi / rsi returns NaN array.

To Reproduce

Run:

customRsi(14, Array.from(Array(100).keys()))

Expected behavior

RSI should return expected results.

commented

Loved this library but stuck at this point 😢

Vivek, thank you for reporting this, let me take a quick look.

It looks like a recently introduced bug. I have a fix. You will be able to check it with the latest on the master branch in few minutes. I can push a release tonight if you are consuming it directly from the npm.

Release v1.0.8 comes with the fix.

commented

Thanks @cinar for your quick response & fix. Also thanks for the tests! ❤️

You're welcome!