As you become a more experienced investor, you will want to use in-depth tools to analyse when to get in and out of trades – and one of the most useful ways of doing this is through the exponential moving average indicator, or EMA.
If it sounds too technical, don’t panic – it’s actually quite simple to use in practice, and is basically just a refinement of the simple moving average (SMA).
Let’s just recap how a simple moving average works. This gives you the average price of a stock over a set number of days, depending on your investment horizon –whether you’re a short-term or a long-term investor.
It can help cut through the noise on a stock chart by showing long-term trends as a single line.
As the name suggests, it changes every day – so if it’s a 50-day moving average, on day 51, the original day 1 drops off the calculation and is replaced by the new figure.
Reflects recent data
The EMA works in exactly the same way, but reflects the most recent data more closely. While the SMA can often lag the market – meaning you could miss the optimal point to open a trade – the EMA will show these signals more accurately.
To arrive at your EMA, you start by calculating your SMA, which is a simple average calculation – add the figures together and divide by the number of numbers used.
For example: 10-day SMA = sum of figures ÷ 10
You then add a weighting that reflects the bias you want to give to the most recent prices, creating a weighted moving average with the emphasis on the most recent prices.
A typical 10-day EMA adds an 18.18% weighting to the most recent price, while a 20-day EMA applies a 9.52% weighting.
The moving average formula goes something like this:
EMA weighting = multiplier (2) ÷ time period +1 (10+1) = 0.1818 (known as k)
And to calculate the EMA: EMA = price today x k + yesterday’s EMA x (1-k)
If all these formulae are making your head spin, the good news is that most trading platforms offer charts that do it all for you, and you can simply overlay your chosen formula on the live stock chart.
While exponential moving averages are good for spotting sudden shifts in price movements, they are less accurate than SMAs when charting long-term trends. They are also not as good at identifying levels of support or resistance (see article on simple moving averages). By weighting for recent price movements, an EMA indicator could also tip you out of a trade sooner than you wanted if a stock has a short-term blip.
The EMA indicator can be taken one stage further to calculate the moving average convergence divergence (MACD) oscillator. This was developed by Gerald Appel in the 1970s and shows the relationship between two sets of moving averages.
The MACD subtracts the longer-term EMA from the shorter-term EMA to produce a trace that reflects both trend and momentum.
A typical setting subtracts the 26-day EMA from the 12-day EMA, which is plotted on the graph. A nine-day EMA, known as the signal line, is then laid on top, and can show potential buy and sell signals.
Crossovers and divergence
As with the simple moving average, you can use the MACD to look for crossovers and divergence.
If the MACD falls below the signal line, it’s a sign of bearish movement, and could be a sell signal. Equally, if the MACD rises above the signal line, it’s a bullish sign, and could suggest it’s the right time to buy.
When the stock price diverges from the MACD, it usually shows the end of a trend. If the price is falling and the MACD is going up, it’s a bullish sentiment that suggests a downward trend is about to end.
If the stock price is rising and the MACD is falling, that suggests a rally may be about to come to a halt.
A dramatic rise in the MACD, where the shorter moving average rises rapidly above the longer term EMA, is a sign the stock has been overbought and will soon fall back to normal.
An important thing to remember about both SMAs and EMAs is that because so many traders use them, they become a self-fulfilling prophecy – so if it’s giving a ‘buy’ or ‘sell’ signal, don’t try to buck the trend, or you could get your fingers burned.