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

RSI #121

Closed t-westwood closed 6 years ago

t-westwood commented 6 years ago

Hi, when i run the rsi on node.js, the result is not the same as on binance, im currently inputting 250 candle.close's, should I have less values in the array or more maybe?

Thanks!

anandanand84 commented 6 years ago

It is exactly the same between https://cryptotrading-hub.com and binance. Cryptotradinghub uses this library. Can you show your data about your comparison?

image

t-westwood commented 6 years ago

hi cheers for the quick reply, my data is coming up as the same as cryptohub. but if you compare for example, the last 10 candles rsi on TRXBTC (5 min candle) for both binance and cryptotradinghub, binance last 10 RSIs are in the 30's crypto hub is in the 50-60s?

anandanand84 commented 6 years ago

well, it is wrong in binance, see below chart comparing cryptotradinghub and tradingview.

screen shot 2018-03-27 at 5 10 30 pm

anandanand84 commented 6 years ago

My guess is binance id not usinh more precision that is why it doesn't not work correct on low decimal markets.

t-westwood commented 6 years ago

haha Fair dooze! Awesome job by the way, you have legit saved me sooo much time, I have been been trying to code these indicators from scratch, and im pretty crap at coding haha. thanks for the reply mate, my mind is now put to ease lol.

anandanand84 commented 6 years ago

You are welcome. I'll close this issue.

saru2020 commented 1 year ago

I've found that the RSI works when all the data are given at once meaning don't feed in only period+1 or limited data per se, just input the whole list of values and the RSI indicator precisely matches the values in TV, it just works beautifully.