RSi values are confusing me.

 

Hi folks, I wonder if someone can explain something for me please?

The correct calculation for RSI is - RSI = 100-(100/(1+U/D)), where U is the average number of positive price changes; and D is the average number of negative price changes.

But, on my MB Trading MT4 platform, the RSI(14) values I see do not match that calculation. For example the RSI(14) value on the platform, for EURUSD on the 19th January this year was 35.77 - but taking the last 14 closes and calculating the RSI by hand, it should be 50.15, a considerable difference. Here are the calculations:

Date Close
Up Close Down Close Avg Ups Avg Downs Avg Ups/Avg Downs Avg Ups/Avg Downs + 1 100 / Previous RSI
03/01/10 1.42891
0.00000 1.42891 0.61556 0.71603 0.85968 1.85968 53.77258 46.23
04/01/10 1.44261
1.44261 0.00000 0.71860 0.61325 1.17179 2.17179 46.04488 53.96
05/01/10 1.43544
0.00000 1.43544 0.61580 0.71578 0.86032 1.86032 53.75414 46.25
06/01/10 1.43991
1.43991 0.00000 0.71865 0.61338 1.17162 2.17162 46.04866 53.95
07/01/10 1.43120
0.00000 1.43120 0.61616 0.71561 0.86102 1.86102 53.73397 46.27
08/01/10 1.44085
1.44085 0.00000 0.71908 0.61352 1.17205 2.17205 46.03941 53.96
10/01/10 1.44972
1.44972 0.00000 0.82263 0.51175 1.60749 2.60749 38.35108 61.65
11/01/10 1.44831
0.00000 1.44831 0.72022 0.61520 1.17072 2.17072 46.06764 53.93
12/01/10 1.44890
1.44890 0.00000 0.72119 0.61520 1.17229 2.17229 46.03435 53.97
13/01/10 1.45323
1.45323 0.00000 0.72231 0.61520 1.17410 2.17410 45.99595 54
14/01/10 1.44174
0.00000 1.44174 0.72231 0.61552 1.17349 2.17349 46.00898 53.99
15/01/10 1.43857
0.00000 1.43857 0.72231 0.61601 1.17255 2.17255 46.02884 53.97
17/01/10 1.43740
0.00000 1.43740 0.61966 0.71868 0.86221 1.86221 53.69954 46.3
18/01/10 1.43929
1.43929 0.00000 0.72247 0.71868 1.00526 2.00526 49.86881 50.13
19/01/10 1.42129
0.00000 1.42129 0.72247 0.71814 1.00602 2.00602 49.84986 50.15

Hopefully that all formatted OK. Any help or advice greatly appreciated. Pete.

 
handlep:

Hi folks, I wonder if someone can explain something for me please?
The correct calculation for RSI is - RSI = 100-(100/(1+U/D)), where U is the average number of positive price changes; and D is the average number of negative price changes.
[...]

It depends whose definition of RSI you're talking about. MT4 is clearly using a definition which is a cousin of the one given e.g. by Wikipedia (http://en.wikipedia.org/wiki/Relative_Strength_Index) which uses an exponential moving average of the gain/loss.

My broker's historic data is different to yours (I have daily RSI on Jan 19th at 37.21, not 35.77), but I can exactly replicate MT4's RSI calculation in Excel by doing the following:

The initial RSI value, after 14 bars into the D1 bar history, is simply based on the mean of the daily gains and losses. All subsequent RSI values are based on a moving average of the gains/losses where the formula is ((YesterdayAverageOfGain * 13) + Gain) / 14. In other words, the calculation of each daily gain/loss figure is equivalent to the last formula given in the Wikipedia definition: AvgUtoday etc.