This is part nine of a series on technical analysis about moving averages. Click here for the series overview in part one. Click here for part two on the history of technical analysis. Click here for part three on an overview of candlestick charts. Click here for part four on basic candlestick patterns. Click here for part five on advanced candlestick patterns. Click here for part six on Bollinger Bands. Click here for part seven on trend lines. Click here for part eight on Fibonacci retracements.
One of the most fundamental tools used in technical analysis is moving averages. The most commonly used average used in finance is the simple moving average, although some traders also use exponential moving averages. Exponential moving averages place more weight on more recent prices than on older ones, while the simple moving average weights all data points within the set equally.
Calculating moving averages
Moving averages provide more clarity on price movements because they filter out the noise of individual trades or short timeframes like five minutes or an hour. Some common timeframes used by traders include the 20-day simple moving average and the 50-day simple moving average. Traders also look at longer trends like the 200-day moving average. Moving averages can also be customized to whatever time period traders want to examine. The shorter the timeframe is for the calculation, the more sensitive it is to changes in the price.
Calculating the simple moving average is as simple as adding the averages of each period together and then dividing by the number of data points. For example, the 20-day simple moving average is calculated by adding the average prices of each of the last 20 days and then dividing by 20.
The exponential moving average is a bit more complex because of the greater weight it assigns to more recent data points. Most traders use software that does the calculations for you, but for those who want to understand how the math works, here’s the formula. You start by calculating the smoothing number, which is done by dividing two by the selected time period and adding one, so the smoothing number for a 20-day average would be two divided by 21, which is 0.0952.
To calculate today’s exponential moving average, you take the smoothing number, divided by the number of days plus one, and then multiply that by today’s price. Then you add that total to yesterday’s exponential moving average and then multiply it by one minus the smoothing average over one plus the number of days.
Moving average indicators
Moving averages are used to identify trends and momentum direction. A longer time horizon is used for long-term trades, while shorter time periods are used for short-term trades. Many traders look at multiple time horizons because of the signals that appear when one average crosses over another.
For example, a security may be moving in a general upward direction, but this bullish trend is confirmed when the shorter-term moving average crosses over the longer-term average. On the other hand, if the 50-day moving average crosses under the 200-day moving average, it confirms a bearish trend because the more recent prices are lower than the prices which are further back.
One common tool based on moving averages is the moving average convergence divergence, or MACD. This indicator is calculated by subtracting the long-term moving average from the short-term average and then plotting these values on the chart. The MACD is positive when the short-term average is bigger than the long-term average, and it signals increasing upward momentum. Traders may want to buy the security when this is the case. A negative MACD means the price is trending downward, so it may be time to sell or at least to refrain from buying because more downside is likely ahead. Although chart technicians can use any time periods for their calculations, it’s common to use the 12-day and 26-day moving averages for this indicator.
Traders may also calculate a signal line on the same chart as the MACD. The signal line is a nine-day moving average of the MACD, and when the MACD crosses the signal line, it generates a buy or sell signal. When the MACD crosses above the signal line, it generates a buy signal, while it generates a sell signal when the MACD crosses below the signal line.
More experienced traders may also look at divergence, which occurs when the MACD is moving in the opposite direction of the security’s price. Divergence is a sign that the current trend might be weakening, and thus, it’s considered a signal that a reversal could be just around the corner.
How to use moving averages in technical analysis
In addition to generating buy or sell signals, moving averages can be used as support or resistance levels. For example, you may notice that the actual price of an asset repeatedly touches its 50-day moving average but doesn’t fall below it. That means the price is serving as a support, which means it might be a good idea to buy at that level because it suggests the price could keep bouncing off it.
On the other hand, if the 50-day moving average is serving as a resistance level, it suggests that the price is having difficulties breaking above the average. Thus, if it finally does break through the average, it becomes a bullish signal that a new uptrend could be starting.
Of course, as with all parts of technical analysis, using the moving average in this way doesn’t always generate firm signals. They are more like general guidelines which serve as hints about what could be to come.
As already discussed, whenever a cross appears on the chart, it often triggers a buy or sell signal. Crosses may be formed when two moving averages cross over each other or when the price crosses over one or more moving averages. When the price crosses one of the moving averages, it basically suggests that the trend could be changing.
When two moving averages cross each other, they form either a golden cross or a death cross. The golden cross is formed when the shorter-term moving average crosses above the longer-term average, which suggests the trend is shifting upward. The death cross occurs when the shorter-term average crosses under the longer-term average, which means the trend is shifting downward.
A final note on moving averages
It’s important to note that moving averages are based on historical prices, which means there is nothing which inherently predicts what prices will do next. Sometimes price trends do follow the signals generated by interpreting moving averages, and sometimes they do not. As with all technical indicators, it is best to use one or more other indicators with the moving average to see if the signals they are throwing up confirm each other or not.
Additionally, it’s better to use moving averages when there is a strong trend in either direction. They are generally not good indicators to use during times of volatility because of the wide variance in the prices. When prices are swinging back and forth constantly, there are too many signals being generated, so it’s hard to know what to do. Using longer time horizons like 200 days can help smooth some of this volatility out, but that may not be helpful for traders with a short-term mindset.