Moving averages are some of the most fundamental and versatile of all indicators used for technical analysis. The purpose of a moving average is to identify or signal that a new trend has begun or that an existing trend has reversed.
While chart patterns may be subjective and hard to follow, moving averages are precise and easy to interpret. This is what makes them so attractive to novice technical traders, even those with no technical background can be profitable from using basic moving average trading strategies.
The main disadvantage of the moving average is that it’s a lagging indicator, meaning that it never anticipates moves; it only reacts to price action. Moving averages can indicate trend has begun, but only after the fact.
How to construct a moving average
As the word implies, a moving average is simply the average of a selected body of data over a period of time. The construction of a moving average allows for easy identification of market trends and generate simple buy and sell signals.
For example, if a 10 day average of closing prices is desired, each closing price over the last 10 days is added and divided by 10. The average is plotted and starts to “move” as each subsequent closing price is generated, the longer the average period the “smoother” the plotted line will appear.
A longer moving average, such as a 55 day average, would not follow the price action as closely as the 10 day average. The delay of a moving average can be reduced but never eliminated due to the nature of its construction, which average you choose will depend on the individual market and trading strategy.
Closing prices are the most common value used for moving averages; however other values such as opening, closing, high, and low and average prices can be used. Furthermore, these individual price values can be averaged to create moving average values, such as adding the opening and closing price of a candle and dividing by two.
Simple Moving Average
The simple moving average (SMA) gives equal weight to each price used in the calculation. This is the most commonly used type of moving average among technical analysts.
In a 10 day moving average, for example, the last day’s price will receive the same weight as the price on the first day of the series. Each day’s price is assigned a 10% weight distribution. A 5 day average would assign a 20% weighting to each day.
Weighted Moving Average
While the simple moving average may be the most commonly used among technical analysts, there are some who believe that heavier weight should be given to more recent prices. In this instance, a linearly weighted moving average can be used.
Using the linearly weighted method, the closing price of the last point is multiplied by the total number of points and each previous price is multiplied by the previous number of points. As an example, a 21 day moving average would multiply the last day by 21, the 20th day by 20, the 19th by 19, and so on. The total is then divided by the sum of the multipliers (21 + 20 + 19 + … + 1) to plot the average.
Exponential Moving Average
While the linearly weighted moving average attempts to solve the problem of price relevance by adding weight to the most recent prices, this average only includes prices for the period covered by the length of the average itself. The exponential moving average (EMA) is a weighted average that expands on the liner average by assigning greater relevance to the recent price action over the entire life of an instrument.
Another feature of the EMA is that greater or lesser weight can be given to the most recent price point by assigning a percentage value. This value is then added to a percentage of the previous value, each adding up to 100.
For example, the last price could be assigned a value of 20% (0.20), which is added to previous value of 80% (0.80), giving the last price 20% of the total weight. The exponential moving average is preferred by some technical analysts because it’s more sensitive than the simple moving average.
Moving Average Trend Filtering
As discussed earlier, the moving average is a smoothing device that can be used to reduce price action noise and identify a trend. The most common way of trend identification is by determining whether the price has closed above or below a moving average, and its distance from the moving average.
For example, the 200 day moving average is what I like to use for trend filtering. If price is trading above the 200 day EMA, there is a bullish bias and you look for buying opportunities.
When price is trading below the 200 daily EMA, there is a bearish bias where you look for selling opportunities. This method works best on longer time frames, such as the 4 hour and above but can also be used for shorter term trends.
The goal with this method is to avoid making risky counter trend moves. While price may be trading above the 200 EMA on the 30 minute chart, it could be well below the 200 EMA on the daily which indicates a greater chance of price going down rather than up.
How to Trade Moving Averages
In addition to trend filtering, moving averages can be used to generate trading signals. The most basic strategy would generate buy signals when price moves above the moving average, and sell when price moves below.
If a short term moving average is used (5 or 10 day), the line will follow price closely and many crossings are likely to occur. This will generate many false signals and result in more trades (and more trading fees).
Using a longer average for this strategy is slower but more reliable. Longer averages can also generate premature buy and sell signals but less frequently than a shorter average.
The trick with the single moving average strategy is to fine tune the period that works best with the timeframe and trading style. As a general rule of thumb, longer averages work better when trends are strong, shorter averages are better when the trend is in a reversal.
Double Moving Average
To help reduce false trading signals, two moving averages can be plotted on a chart to generate signals when a crossover occurs. This means that a buy signal is produced when the shorter average crosses above the longer; a sell signal comes when the shorter average crosses below the longer.
The use of two moving averages to generate trading signals lag price action more than the use of a signal moving average but also produces less “whipsaws.” Popular combinations for the double moving average crossover strategy include the 5 day / 20 day and 10 day / 50 day.
Triple Moving Average
Expanding on the double moving average strategy, a third moving average can be added to further confirm trading signals. The use of three signals is more advantageous than two because trading “alerts” can be generated before actual signals.
For example, the most popular triple moving combination is the 4-9-18-Day, first developed by R.C. Allen in 1972. A buying alert takes place in a downtrend when the 4 day crosses above both the 9 and 18; the alert becomes a confirmed buy signal when the 9 day then crosses above the 18.
As the trend develops, the moving averages tend to “fan out”in the direction of the trend. The moving averages then become a dynamic support/resistance for the trend.
During times of correction and consolidation the moving average lines will tend to intermingle but the general uptrend remains intact. These times can be used for buying or selling opportunities depending on how aggressive of a trading strategy is in place.
Sell alerts occur in an uptrend when the 4 day average moves below the 9 day and the 18 day. The confirmed sell signal is given when the 9 day dips below the 18 day.
Moving Average Envelopes
Percentage envelopes can be used to enhance the usefulness of the single moving average to indicate whether price action has strayed too far from the moving average line. Envelopes are constructed using a fixed percentage above or below the average.
One example would be the use of a 15% envelope around a simple 21 day moving average. When price reaches one of the envelopes (15% deviation from the average) the short term trend is considered to be overextended.
This technique is similar to using the trading bands developed by John Bollinger, the percentage deviation and average period you choose will depend on the timeframe and individual market. You can optimize these settings by experimenting with different values and seeing how they correlate with past prices.
One of the greatest lure of the moving average is that they are easy to use and force a trader to obey the simple rules of trading by letting profits run and cutting losses short. Most importantly the moving average naturally trades with the trend; however there are some pitfalls that should be observed before basing a trading strategy on moving averages alone:
- Moving averages work best when markets are trending. They don’t work well during times of consolidation or “price noise.”
- Moving averages lag price action, giving signals well after most of a move has been made. They key is to use moving averages in conjunction with momentum oscillators to find confluence.