kylejusticemagnuson / pyti

Python library of various financial technical indicators
MIT License
646 stars 169 forks source link

StockRSI only returning NaN #27

Open joaosauer opened 4 years ago

joaosauer commented 4 years ago

Hi!

First of all, amazing library! You made a great job here. My question is regards stockRSi indicator, that only returns NaN for me. I was planning to use it for the bitcoin trades, but the coins that I'm using have very small values (this is the values of converted_to_list[1]): <class 'tuple'>: (0.01411, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.01411, 0.01411, 0.01411, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.0141, 0.01411, 0.01411)

And then, independent of the period that I pass, the values are always NaN. I'm calling: stochrsi.stochrsi([i * 1000 for i in converted_to_list[1]], len(converted_to_list[1])) I tried to multiple the values by 1000, to make then more like your examples, but still gettin NaN.

Any idea why?

Many thanks, Joao