TulipCharts / tulipindicators

Technical Analysis Indicator Function Library in C
https://tulipindicators.org/
GNU Lesser General Public License v3.0
841 stars 157 forks source link

Stochastic RSI cannot be negative #113

Open bennycode opened 2 years ago

bennycode commented 2 years ago

Hi @codeplea, I have checked your Stochastic RSI implementation and was wondering why it becomes negative (-0.54) at the end of your "Example Calculation"? From what I have read on Investopedia the Stochastic RSI ranges only between 0 and 1: https://www.investopedia.com/terms/s/stochrsi.asp

Your tests actually show the same by expecting 0.000 at the end:

https://github.com/TulipCharts/tulipindicators/blob/0bc8dfc46cfc89366bf8cef6dfad1fb6f81b3b7b/tests/untest.txt#L382-L384

So how come your website lists "-0.54"?

codeplea commented 2 years ago

This seems to be an error with the website documentation. Thanks for letting me know. I'll make sure it gets fixed on the next update.