Interesting that they produce the same result (and that it's called Cutlers when using SMA). Would you know if my SMA-code looks correct? I think it's okey but would be great if I could get it confirmed.
I've followed macrooptions link and then I got unsure when looking at a regular RSI in MT4, in retrospect I now understand with the help of some previous answers that the MT4 RSI is calculated with a EMA which is why my own code based on SMA differs :)
If by "average" that they use there they mean "simple moving average", then they are describing Cuttlers' RSI there - not the Welles Wilders' original version
Fairly good description of the original RSI can be the one bellow (from here : RSI calculation - you will notice that they are describing SMMA calculation)
In Wilder's RSI, RS uses Wilder's smoothing which is a different form
of exponential averaging. Wilder's smoothing = Previous MA value + (1/n
periods * (Close - Previous MA))
RSI = 100 - --------
1 + RS
RS = Average Gain / Average Loss
To simplify the calculation explanation, RSI has been broken down into its basic components: RS, Average Gain and Average Loss.
This RSI calculation is based on 14 periods, which is the default
suggested by Wilder in his book. Losses are expressed as positive
values, not negative values.
The very first calculations for average gain and average loss are simple 14 period averages.
The second, and subsequent, calculations are based on the prior averages and the current gain loss: