Hello, I am implementing RSI using Wilder’s smoothing in Python and I am trying to match the values shown on Kite/TradingView.
Environment: Python 3.9, pandas/numpy
Indicator: RSI (period = 14)
Data: Daily OHLCV candles from Kite Connect API
Code logic:
Seed average gain/loss with SMA of first period values
Apply Wilder’s recursive smoothing
Round RSI to 2 decimals at the end
For minute candles, my RSI matches Kite exactly. But for daily candles, I consistently see a small difference of about 0.02. Example:
My RSI = 67.47
Kite RSI = 67.49
I have already tried:
Rounding inside the smoothing loop
Rounding only at the end
Using adjusted OHLC data
Checking for missing days in daily candles
Still, the difference of 0.02 persists.
Is this difference expected due to Kite’s internal rounding/precision, or is there a specific adjustment needed for daily candles to match Kite/TradingView exactly? Here is my code:-
The small difference of about 0.02 between your calculated RSI and the value displayed on Kite/TradingView is expected. This variation arises due to minor differences in data aggregation timing, internal rounding precision, and the specific seeding method used for Wilder’s smoothing. Please note that the calculations on Kite are provided by the charting vendor. For more details, you can refer to the materials provided here. If the difference remains consistently negligible, it is likely due to rounding off.
For more details, you can refer to the materials provided here. If the difference remains consistently negligible, it is likely due to rounding off.