Hi
I have written a code using python, taking database from the db server to calculate the RSI of a stock, but the values are not matching. The correct value is 79.14 but i am getting 77.5 . This formula calculates the RS
First Average Gain = Sum of Gains over the past 14 periods / 14.
First Average Loss = Sum of Losses over the past 14 periods / 14
RS = Average Gain / Average Loss
RSI is :- (RSI) = 100 – 100 / (1 + RS)
can any one let me know if this is the correct formula or anything else.