Oscillators

MACD: Moving Average Convergence/Divergence

MACD shows the gap between a fast and a slow moving average: its direction and size tell you about the trend's momentum.

2 min read · Try it on a live chart ↗

The idea in plain words

When the short-term average pulls away above the long-term one, buyers are accelerating. When the gap narrows, momentum is slowing, often before the price itself turns.

How it is calculated

MACD is the 12-period EMA minus the 26-period EMA. The signal line is a 9-period average of MACD. On our chart, MACD is drawn as bars and the signal line uses a simple average.

MACD = EMA(close, 12) − EMA(close, 26)
Signal = SMA(MACD, 9)   (the classic convention; some platforms use an EMA)

How to use it

  • MACD crossing above its signal line: momentum turning up. Below: turning down.
  • MACD above zero: the short-term average is above the long-term one (uptrend).
  • Divergence: price makes a higher high but MACD a lower high: the uptrend is losing steam.

Drawing conclusions

  • Crossovers far from zero are stronger than tiny ones around zero.
  • MACD has no fixed range; compare it with its own history.

Example

On daily XAUUSD, MACD bars turn positive and rise above the signal line after a month of decline: the first sign that the fall has run its course.

Prices in examples are illustrative.

Watch out for

  • MACD is built from moving averages, so it lags too.
  • Platforms that smooth the signal line with an EMA show slightly different values.

A little history

Gerald Appel created MACD in the late 1970s; Thomas Aspray added the histogram in 1986.

Educational content only. No indicator or pattern predicts the future, and nothing here is investment advice.