Difference in RSI as calculated from API OHLC data and as seen on chart


Trying to generate RSI from daily OHLC values generated from market data received on websocket. The OHLC values match fairly well with the values on the candlestick daily charts. However, the calculated RSI is way off from the RSI seen on the charts.

The RSI formula is from macroption.com: "https://www.macroption.com/rsi-calculation/#sma-rsi". The same formula appears at investopedia.com: "https://www.investopedia.com/terms/r/rsi.asp".

Examples of calculations. Prices are in paise as received on websocket:

Can somebody please find out what can be going wrong in calculating the RSI ?


Sign In or Register to comment.