Moving Average Convergence/Divergence (MACD)

What is the MACD Indicator?

MACD

The MACD indicator is one of the most widely used technical indicators in financial markets. It is a versatile oscillating trend and momentum indicator that was originally developed in the late 1970s by Gerald Appel to identify and measure market trends. The MACD indicator plots the convergence and divergence of two exponential moving averages (EMAs), a fast EMA, with a relatively short look-back period, and a slow EMA, with a longer look-back period by calculating the difference between the two EMAs. These are EMAs of the Close price. This produces the MACD line. When the two EMAs move closer together, it is referred to as convergence; and when they move further apart, it is referred to as divergence.

Gerald Appel added a signal line, which is, in effect, an EMA of the MACD line, to differentiate between bullish and bearish conditions, while also indicating the strength, or momentum, of the trend. The difference between the MACD line and the signal line can be plotted as two separate lines that fluctuates above and below a zero line, or as a MACD histogram. When plotted as two lines, the MACD has no upper or lower limit and, thus, cannot indicate overbought or oversold conditions.

Because of its construction, the MACD is both a trend indicator, as it relies on trend indicating moving averages (MAs), and a very effective momentum indicator that tracks the momentum driving the trend.

How to calculate the MACD Indicator?

The MACD is calculated in three steps. First the MACD line is calculated by subtracting the slower EMA from the faster EMA:

MACD Line = Fast EMA − Slow EMA

The default look-back period for the Slow EMA is 26 while the default look-back period for the Fast EMA is 12.

Next, the Signal Line is added by taking the EMA of the MACD line:

Signal Line = EMA( MACD Line )

The default look-back period for the Signal Line is 9.

Finally, the MACD histogram is calculated as the difference between the MACD Line and Signal Line:

Histogram = MACD Line − Signal Line

The MACD can now be plotted as two lines: the MACD line and the signal line; and as a histogram.

How to trade with the MACD Indicator?

The MACD generates several clear trade signals, especially when plotted as a histogram. The key signals are crossovers of the MACD and signal lines, which correspond with the zero-line crossovers on the histogram; and MACD also indicates divergence between the MACD and the MACD also indicates price action of the security being analyzed.

Signal Line Crossover

A signal line crossover occurs when the MACD line crosses over the signal line and indicates a potential turning point in the movement of the MACD itself. This crossover could be bullish or bearish.

A bullish signal line crossover occurs when the MACD line crosses up over the signal line. Remember that the signal line is, in fact, an EMA of the MACD line. Thus, the short EMA (the MACD line) has crossed up over its own 9-day EMA (the signal line). This indicates that the momentum is shifting to the upside and that a bullish price reversal is probable. This is a potential buy signal.

A bearish cross over, on the other hand, occurs when the MACD line crosses down over the signal line. Here the fast EMA is crossing down over its own 9-day EMA. This indicates that the momentum is shifting to the downside and that a bearish price reversal is probable and is a potential sell signal.

Zero-Line Crossover

A zero-line crossover (or centerline crossover) is, essentially, the same signal as the signal line crossover. It is generated by the MACD histogram. As mentioned earlier, the histogram is a visual representation of the difference between the MACD line and the signal line. The zero-line crossover does, however, provide a more obvious identification of the bullish or bearish nature of the signal line crossovers.

The zero-line crossover occurs when the MACD histogram crosses up or down over the center line (i.e., the zero line). The center line represents the point at which the MACD line and signal line are equal. When the MACD histogram is above the center line, it indicates a bullish period when the MACD line is above the signal line; and when it is below the center line, it indicates a bearish period when the MACD line is below the signal line.

As with the signal line crossovers, a bullish zero-line crossover is a potential buy signal; and a bearish zero-line crossover is a potential sell signal.

Divergences

The MACD also indicates divergence when the MACD peak or valleys of the MACD do not confirm the peaks or valley in the price movement of the underlying security. In other words, the MACD is not confirming the price action of the underlying security. Divergence is a powerful signal that indicates a potential price reversal in the underlying security.

A bullish divergence occurs when the price action of the underlying security makes a lower low while the MACD makes a higher low. This indicates that the downtrend is losing momentum and a bullish price reversal has a greater probable. A bearish divergence occurs when the price action of the underlying security makes a higher high while the MACD makes a lower high. This indicates that the uptrend is losing momentum and a bearish price reversal becomes more probable.

Chart Example

The following chart shows a MACD with the default settings of 12, 26, 9 in the lower chart panel on a 30-minute chart of the Dow Jones Industrial Index. The blue line is the MACD line and the red line is the signal line. The green histogram plots the difference between the MACD line and the signal line.

DOW chart with MACD

MACD on a 30 Minute DOW chart

Advantages and Disadvantages of the MACD Indicator

Advantages

  • Is a versatile trend and momentum indicator that indicates trend strength, trend direction, and trend momentum
  • Generates clear and easy to interpret trade signals when crossovers and price divergence occurs
  • Can be used in various types of markets, from stocks to forex, and even futures markets

Disadvantages

  • Is a lagging indicator, which means is reacts to price action rather than predicting price action
  • Is prone to generating false signals in sideways, range-bound market conditions as well as in volatile market conditions
  • Requires signals confirmation from other technical indicators or technical analysis techniques

MACD FAQ

What is the MACD indicator?

The Moving Average Convergence/Divergence (MACD) is an oscillating trend indicator that uses moving averages to measure the strength and momentum a trend.

Is the MACD a leading or a lagging indicator?

The MACD indicator is a lagging indicator as it is based, not merely on price action, but on EMAs of the price action. This means that the MACD lags price action by a factor of two!

What is MACD divergence?

Divergence occurs when the MACD and the price action plotted on the price chart do not move in the same direction. In other words, the price action makes higher highs while the MACD is moving sideways or making lower lows, and vice versa.

Can the MACD indicator be used as a standalone indicator?

The MACD is a versatile indicator, but it is a lagging indicator and should not be used on its own. It should be combined with other technical indicators or technical analysis techniques to confirm the signals it generates.

Lag cannot be overcome completely, but can be reduced by making the MACD indicator more sensitive to changes in the price action. This is accomplished by reducing the look-back period, which essentially reduces the number of data points being averaged by the indicator.

Summary

The Moving Average Convergence/Divergence (MACD) is a versatile oscillating trend indicator that indicates trend direction, trend strength, and the momentum behind the trend. As such, the MACD can be used to identify potential trend reversal points and can generate potential trade entry and exit signals.

However, it is a lagging indicator based on moving averages of price data rather than the price data itself. This makes the MACD twice removed from the price action. It also produces false signals and should not be used as a standalone indicator but should be combined with other technical indicators or technical analysis techniques to confirm its trade signals.