anandanand84 / technicalindicators

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

ATR indicator does not work properly #167

Closed angryhorse0905 closed 5 years ago

angryhorse0905 commented 5 years ago

https://github.com/anandanand84/technicalindicators/blob/master/test/directionalmovement/ATR.js

In this test file, atr.nextValue() param is object of high, low, close prices. But the param type of nextValue() in ATR is number.

anandanand84 commented 5 years ago

Agree, It is an issue with the typings. The test case is correct. You should use high, low, close price to make it work.

anandanand84 commented 5 years ago

Fixed declarations