Last Updated on 3 November, 2022 by Samuelsson
Being some of the best and common trading indicators, moving averages have remained in solid use for many decades. They come in many different versions, but one of the most common ones is the exponential moving average.
An exponential moving average is an average of the close prices for a set period, where recent data points are weighted more heavily than distant datapoints. This makes the exponential moving average more adaptive and responsive than many other average types, which has clear advantages in many situations.
Trading Strategy Membership Monthly Edges
$42 per strategy
Tradestation code and workspace included
In this guide to the exponential moving average, you’re going to learn everything you need to know about the indicator. We’re going to cover how it’s calculated and used, and some of the more common trading methods involving the indicator. We’re also going to look closer at how you may decide which settings are the best for your market and timeframe.
Exponential Moving Average – EMA Definition and Calculation
As we just mentioned the exponential moving average is a type of weighted average, where the recent data point is given more weight, meaning that it has a bigger impact on the moving average line. As a result, the exponential moving average will trail the price much more closely than a regular moving average.
EMA is calculated in the following steps:
1. First, you need to compute the Simple Moving Average, which is a plain moving average. In other words, the 20-period SMA will be the average of the 20 most recent close prices, which simply means that you divide the sum of all close prices by 20.
2. Then we need to come up with the multiplier, which will give the last data point a higher weighting, depending on how long the average is. The formula for the multiplier is as follows
Multiplier = 2 / (selected timeperiod+1)
3. Then you calculate the EMA with the formula below
EMA = [Close – previous EMA] * Multiplier + previous EMA
Since the formula uses the EMA of the previous bar, “previous EMA” will need to be placed with a normal moving average as the calculation is carried out on the very first bar.
Further Reading: Exponential Moving Average Strategy
Selecting the Best Exponential Moving Average Settings
One of the most common questions we get is which length will produce the best results.
To be able to answer this question, we first need to know what you’re aiming to use it for. For example, you’ll need a much longer EMA setting to define the long term direction of the trend, than to define more short term fluctuations.
With this in mind, we wanted to cover the most common exponential moving average settings. And while we don’t say that these are the best settings, they can work quite well. However, to know what works best in your particular situation, you’d better use backtesting, since all markets and timeframes have quite different characteristics.
With that said, here follow some of the most common settings for the exponential moving average!
EMA 5 and EMA 9: The five and nine period EMAs are very short, and will trail the price closely. The biggest advantage of using this setting is that you get a somewhat smoothened reading, which will reduce the effect of sudden and swift price changes, which may distort your analysis.
EMA 13 and EMA 20: These are somewhat longer than the two previous settings, but due to the nature of exponential moving averages, they still will trail the price closely. Below you see a five-period and a twenty-period moving average side by side, for you to see the difference yourself.
EMA 40 and EMA55: Now we’re getting into the medium-term averages, which will deviate somewhat more from the price. These are quite useful to get a better picture of the medium-term trend, which is going to be more significant than any of the trends shown by the shorter EMA:s
EMA 100 and EMA 200: These are the lengths that give you an idea about the longer-term trends of a market. Especially the 200 period EMA is often used to determine whether a market is in a long term trend that’s positive or negative.
Which Timeframe is Best for the Exponential Moving Average?
Another common question we get is which timeframe you should choose to use together with the Exponential Moving Average. Now, the answer varies a lot depending on factors such as the strategy and market you trade, but in general you could say that the higher the timeframe, the more reliable signals you’ll get.
In fact, exponential moving averages tend to work best with daily bars, which has a lot to do with the fact that this is the setting that’s watched by most market participants. As such, many will stand ready to take action once a signal forms, making it something along the lines of a self-fulfilling prophecy.
Another reason why this is the case, is that the daily timeframe contains a lot of less noise than lower timeframes, which leads to more accurate signals and results!
Of course, moving averages will work across a lot of timeframes, and we really recommend that you check out backtesting to help you discover what works best for your market and timeframe!
Common Uses- EMA Trading Strategies
Now with some of the most common questions out of the way, we are going to have a look at some of the most popular ways of using the exponential moving average. We’ll cover how you can use EMAs to define mean reversion, as well as trend following opportunities.
Just be aware that the trading strategies below aren’t ready to be traded live in their current form. While they certainly act well as inspiration, you’ll have to make sure that they work with your market and timeframe. Sometimes you may have to make tweaks to the concepts, to make them resonate with the market you’re trading.
Having said this, let’s have a look at them!
EMA Price Crossovers
One of the most popular ways to use Exponential Moving Averages is to look for shifts in momentum, which can be seen when the price crosses below or above the EMA. A crossover above the EMA signals that the market is entering a more bullish environment, while a crossover below the EMA signals that the market is becoming more bearish.
Some traders will, therefore, choose to go long when the price crosses the moving average from below, and short when it crosses it from above. In the image below, you can see how the price first crosses above the EMA, and then breaks below it!
Double EMA crossovers
A quite similar approach to using the EMA, is to look for when a short EMA crosses over a long EMA. While being close to identical to normal price crossover, it comes with one big advantage, which is that you avoid many false signals.
Markets are very prone to breaking various support and resistance levels, just to turn around one second later. And if you act on those signals, you’ll essentially be left with a big loss.
By requiring that a short exponential moving average crosses over a longer average, you’re essentially demanding more of a market before you take a signal, which in theory should improve the accuracy and profitability of the signal.
So, what lengths do you usually use when looking for exponential moving average crossovers?
Well, let’s have a look at the two most common combinations!
20 and 50-period EMA: With this combination, we attempt to catch shorter-term momentum changes relative to the medium-term momentum. With the averages being fairly short, this is a combination that will produce quite many signals. However, this, of course, comes at the cost of more false signals.
50 and 200-period moving average: This combination is often used by traders with a longer outlook, who attempt to catch movements that last for months or even years. With the averages being so long, we’ll get fewer but more reliable signals.
When looking for moving average crossovers, you generally want the averages to be sloping in the direction of the crossover. In other words, for a positive crossover to be worth taking, the long term average should slope upwards, with the opposite condition applying for negative crossovers.
EMA Distance to Price
Up until now, we have only covered how you can use the exponential moving average as part of a breakout or trend-following approach. However, as we mentioned briefly before, you could also use moving averages in mean reversion as well.
For those who don’t know, mean reversion is when the market has overextended itself to the upside or downside, resulting in a corrective move in the opposite direction. In some markets, like stocks, you’ll find that mean reversion works great, while it doesn’t work that well in other markets like commodities.
By measuring the distance of the close to the moving average, we consider the exponential moving average to be the mean, from which the price is deviating. As such, you could define a good entry point as the market being at its longest distance from the EMA, 20 bars back. This ensures that the market is oversold, and is likely to turn around soon. In the image below you see an example of this setup.
One important thing to note about mean reversion strategies, is that you, in essence, are trying to catch a falling knife. This means that the market could continue to go against you for quite some time before it eventually turns around.
In such cases it’s important to note that the edge usually gets better the more a market has fallen. Therefore you don’t want to use a stop loss that’s too tight, to not risk getting stopped out too early.
When we trade mean reversion strategies we often don’t use a stop loss at all. However, this is only possible since we trade these strategies with so little capital, and use algorithmic trading to trade up to 100 other trading strategies simultaneously.
Simple Moving Average VS Exponential Moving Average
As you probably know, the exponential moving average is just one of several moving average types. Another one, which probably is even more common, is the simple moving average.
In contrast to the exponential moving average, the simple moving average gives the same weight to all data points, which makes it adapt slower to changes in price.
In the image below, you see both the SMA and the EMA, and how the former clearly lags the latter.
Most times we find that many trading strategies actually get a small boost in performance when the simple moving average is replaced with the exponential moving average. However, this is highly dependent on the strategy, and results will vary quite a bit!
Spotting Support and Resistance with the Exponential Moving Average
Another way to use the EMA, is to find useful support and resistance levels.
Support and resistance is a concept that’s covered in our article on support and resistance levels, and in short, it means that the market deems some levels as more significant than others. Often, these are clearly visual levels in a chart, such as significant highs and lows.
Since many people use the exponential moving average, a lot of market participants will notice when the price approaches the EMA, and therefore react to it. In essence this could be said to be the reason why it works as well as it does.
Below you see an example of how the market turned around as it got down to the 200-period EMA.
In this guide to the exponential moving average, we’ve covered how the EMA works, and how it may be used in trading. In addition, we’ve also had a closer look a the differences between the EMA and the SMA, and a couple of trading strategies that make use of the indicator.
For those who are interested in learning more about moving averages, we highly recommend that you have a look at our guide to moving averages!
Comments are closed.