# RSI on an EMA calculated basis

hi!
Wilder's RSI is calculated using a simple moving average (SMA) on the "average" gains/losses. Now I have noticed that some platforms use an exponential moving average (EMA) instead. In some cases, this can be advantageous.

I wonder, is there any faster way, to change the "parameters" of the built in RSI-function to EMA, or would I have to rewrite the code, as described here? https://www.amibroker.com/guide/afl/rsi.html

thank you
Patrick

@TATrader I think it is worth your doing a little research. Learn about the indicators you want to use.

I have not read the book in a long time but I think I recall that Wilder's RSI is NOT calculated using a simple moving average. Wilder designed his RSI to work with the Wilder Smoothing (read New Concepts in Technical Trading Systems, his 1978 book). So now you need to learn what that is.

Then you could learn that it is essentially the same as an exponential moving average with an adjustment in the look back periods. Such that the equivalent ema is the same if you alter the look back periods -- multiply by two and then subtract 1.

So a 20 period Wilders smoothing moving average is the same as a 39 period ema.

1 Like

So a 20 period Wilders smoothing moving average is the same as a 39 period ema.

Thanks a lot - this shortcut helps (me) to get much clearer signals!

That is totally incorrect statement.

Wilders RSI is calculated using Wilders smoothing http://www.amibroker.com/f?wilders which is in the essence exponential moving average with `1/Period` smoothing factor instead of `2/(Period+1)`

1 Like

Thanks @Tomasz or the more detailed definition clearing my misconception of Wilder's RSI Sometimes, a "small" detail can make a huge difference in terms of AFL results.

Patrick,