Andrew Page
Andrew Page

Moving averages have long been a favourite tool of technical analysts because of their simplicity and predictive power. Over the years, traders have further refined and adapted the concept and today moving averages form the basis of many momentum indicators, from Bollinger bands to oscillators.

In recent years it’s been the MACD indicator which has really grown in popularity, due in part to the ease with which software applications can plot the indicator, but also due to its accuracy and flexibility.

MACD stands for Moving Average Convergence Divergence and is constructed in several steps.

First we need to generate the MACD line, which is calculated as the difference between two exponential moving averages. The most common averages used are the 26 and 12 day exponential moving averages. (Remember that an exponential moving average is one which gives a greater weighting to more recent data points). Generally, you should use shorter term averages for more volatile securities, while less volatile securities should have longer averages.

Figure 1. The MACD line is the difference between the 12 and 26 day moving average

click chart for more detail
click to enlarge

As you can see in Figure 1, whenever the 12 day exponential moving average (blue line) is below the 26 day moving average (purple line), the MACD line is in negative territory. When the two moving averages cross, the values are of course equal, and this is where the MACD line will cross the zero line. And when the shorter moving average is above the longer term moving average this is when the MACD line will be in positive territory. All of this is self evident and is easily seen by comparing the MACD line with the two exponential moving averages.

Even though the MACD line is just one component of the complete MACD indicator, traders can still obtain useful information from it. For starters, when the MACD line is above the zero line, it signals upward momentum. Conversely, when the MACD line is below the zero line it is a sign of downward momentum.

As such you can use the position and direction of the MACD line to help confirm the start of a trend. Should you see a stock price start to appreciate, wait until the MACD line turns positive to help validate the strength of the trend.

As you can see in the example above, the S&P ASX 200 saw several up ticks over February and March, however neither of these were confirmed as the start of an up trend, with the MACD line remaining negative. In mid-March we saw the start of an up trend which was later confirmed in early April, and since then the market rallied strongly through to mid May.

The MACD line can also be used to identify oversold and overbought positions. Essentially, the MACD line will never deviate too far away from the zero line, and as such the further the MACD line deviates away from zero, the more overbought / oversold the underlying price is.

Figure 2. Identifying overbought and oversold positions with the MACD line

click chart for more detail
click to enlarge

Figure 2 shows how the MACD line identified overbought positions in October 2007 and May 2008. In both cases the MACD line was significantly deviated away from the centre line, and had begun to turn lower. While the timing is not always exact, as was the case for the October 2007 example, the resulting correction is seen to come about within a short time frame.

Conversely, in January 2008 the MACD line dropped to negative 200 signaling an oversold position. Although the market did go on to carve out fresh lows in March, the oversold signal was accurate for over a month.

As useful as the MACD line is, the real strength of the indicator isn’t realized until we add in the signal line. The signal line is simply a 9 day exponential moving average of the MACD line. In essence, it is a moving average of the difference of two other moving averages.

Figure 3. MACD line combined with the signal line. The signal line is a 9 day exponential moving average of the MACD line

click chart for more detail
click to enlarge

Now we have two lines making up our indicator, we can identify buy and sell signals by observing how these lines interact with each other.

Buy signals are generated when the MACD line crosses above the signal line, whereas sell signals are seen when the MACD line crosses below the signal line. As with straight up moving averages, the MACD can generate plenty of false signals in a sideways market. In order to combat this, you should wait until a clear cross has occurred and resist the temptation to enter into a trade the second the MACD line touches the signal line.

Finally, we can add a histogram to our indicator to further increase our accuracy. The MACD histogram is the difference between the MACD line and the signal line.

Figure 4.The MACD Histogram is the difference between the MACD line and the signal line.

click chart for more detail
click to enlarge

The histogram provides us with yet another way to determine the strength of a trend. Essentially we look for areas where the price direction and the direction of the histogram diverge.

In figure 4, we can see that from late April to mid May, the histogram is largely flat (as indicated by the arrow). However over the same time frame we notice a significant increase in price. The two have diverged and this is a sign that the price action is losing momentum. When we combine this with the bearish cross we observe towards the end of may, we take this as a clear sign to exit our position (or even go short).

As you can see, the MACD is a powerful indicator and can reveal a great deal about both the direction and momentum of a security. Because there are several ways to read the MACD, it’s worth summarizing the key points:

  1. 1. The MACD line signals upward momentum when in positive territory, and downward momentum when negative. Use this to validate an observed trend in price.
  2. 2. The MACD line can signal overbought and oversold positions. The further the line deviates away from zero, the more likely it is we will see a correction in price. Try drawing support and resistance lines for you MACD line to work out what levels typically represent overbought / oversold positions.
  3. 3. Buy signals are generated when the MACD line crosses above the signal line. Buy signals are reinforced when the MACD line is in positive territory.
  4. 4. Sell signals are generated when the MACD line crosses below the signal line. Sell signals are reinforced when the MACD line is negative.
  5. 5. Divergence between the price and MACD histogram signal weakness in the trend (loss of momentum). When you start to see the two diverge, look to the other MACD signals to confirm the end of a trend.

As with most analysis techniques, it is worth employing several indicators at once. This enables you to use one indicator to validate the signals of the other, and this can help you identify false signals. Because the MACD is built around moving averages, it is best to use indicators that are not related to help confirm the signals it generates. (On balance volume is good in this regard.)

In any case, the MACD is an indicator well worth becoming familiar with and adding to your arsenal. When considering the purchase of a charting package, ensure that the MACD indicator is included and even customizable. It’s something that no trader should do without.

Make the markets work for you!

Andrew Page