The data I use is adjusted for dividends. For AMGN my rsi(200) is equal to 47.6. However, in P123 I get 53.39. That’s quite a difference. Where could this difference be coming from?
Smoothing needs to be applied for both the average gain and the average loss series.
The average gain and average loss series are initialized using an average of the first period samples. Then 100 bars of gain and loss are used for smoothing. So for RSI(200), you would use 301 bars most of the time and as few as 201 bars. (Only fewer than 100 are used if a stock doesn’t have enough price history yet.)