anandanand84 / technicalindicators

A javascript technical indicators written in typescript with pattern recognition right in the browser
MIT License
2.15k stars 557 forks source link

Bollinger Bands NaN values in browser #134

Closed Debuggedd closed 5 years ago

Debuggedd commented 6 years ago

Hello,

I'm encountering an issue where I get NaN values for upper and lower bollinger bands with input that normally does the job when using it in Node. This issue is most likely related to the browser I guess. Can you help me out?

a813c1a02755b2f2a97c16e4cda55c3f

anandanand84 commented 6 years ago

can you provide the inputs used?

Debuggedd commented 6 years ago

Thanks for the quick response. The inputs used are visible in the picture, at the top.

anandanand84 commented 5 years ago

Could not reproduce

Georgy45 commented 3 years ago

Hi,

I have the same thing directly in Node.

Searched a bit, and found out that for some reasons, the stDev var is not passed (it returns "undefined" in BollingerBands class). I replaced stDev by 2 in the BollingerBands class, lines 828/829 of /dist/index.js, and now it works.

elcilie commented 1 year ago

Hey ppl. You both are passing a mispelled parameter. is stdDev, not stDev (one "d" missing after "st").