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

CCI using 20 instead of input #161

Closed itraderobots closed 5 years ago

itraderobots commented 5 years ago

The CCI is using the number 20 instead of the input, which is an issue for anyone who wants to use a CCI period other than 20. I change it manually to reference the CCI period I needed to use by replacing the number 20 with input.period and it worked, although there is probably some other way you prefer.

It needs to be changed to use the input provided by the programmer in these two places:

https://github.com/anandanand84/technicalindicators/blob/718cabf3d763109bb844569d348a3054b3d9d9e6/lib/oscillators/CCI.js#L40

https://github.com/anandanand84/technicalindicators/blob/718cabf3d763109bb844569d348a3054b3d9d9e6/dist/index.js#L1889

anandanand84 commented 5 years ago

Thank you. I will fix it.

RomanKisilenko commented 5 years ago

Hi, please make this fix.

anandanand84 commented 5 years ago

Fixed and published

RomanKisilenko commented 5 years ago

Thank you!