Topics
  • Technical indicator

MACD

MACD is the difference between the 12- and 26-period exponential moving averages. A 9-period average of that difference forms the signal line, and the gap between the two forms the histogram. It shows how far the short-term average is from the long-term one, and whether that distance is growing or shrinking.

Price MACD (12, 26) Signal (9) Histogram 0
The dashed line is the zero line. The dots mark where MACD crosses the signal line: the histogram changes sign at those points. Note that the crossovers come a few candles after the price high and low.

Which question does MACD answer?

MACD answers this question: how far above or below the long-term average is the short-term average, and is that gap growing or shrinking? A growing gap can be read as the move speeding up, a shrinking one as it slowing down.

The "convergence and divergence" in its name describes the two averages moving towards and away from each other. Unlike RSI, MACD has no fixed upper or lower bound; its value is measured in the price's own units.

How it is calculated

  1. Calculate two exponential averages. Take the 12-period and 26-period EMA of closing prices.
  2. Find the MACD line. MACD = EMA 12 − EMA 26. The value is positive when the short average is above the long one and negative when it is below.
  3. Draw the signal line. Signal = the 9-period EMA of the MACD line. It is a smoothed version of MACD that lags a little further behind.
  4. Calculate the histogram. Histogram = MACD − signal. The bars show whether the distance between the two lines is growing or shrinking.

How it is commonly read

  • The zero line: when MACD is above zero, EMA 12 is above EMA 26. MACD crossing zero is the same event as the two averages crossing.
  • MACD rises above the signal line: can be read as short-term momentum turning up. The histogram turns positive.
  • MACD falls below the signal line: can be read as short-term momentum turning down. The histogram turns negative.
  • A shrinking histogram: the lines are converging and the move is slowing. On its own it does not show a change of direction.

Lag and sideways markets

MACD is built by averaging three times, so it trails price. Crossovers often appear a few candles after the turn in price. In fast, sharp moves this lag can cover a large part of the move.

When price moves back and forth in a narrow range, the two averages stay very close. MACD hovers around zero and crosses the signal line often. Most of these crossovers do not turn into a lasting change of direction.

Differences such as price making a new high while MACD makes a lower one are read as divergence; that topic is covered on the divergence page.

What it shows, what it does not prove

What it shows

  • How far apart the short- and long-term averages are
  • Whether that distance is growing or shrinking, so whether the move is speeding up or slowing down
  • Which order the averages are in (which side of the zero line)

What it does not prove

  • That price will move in the direction of a crossover
  • When a reversal will happen; averaging three times makes it lag
  • Anything when comparing two assets at different prices; the value is in the price's own units

The MarketLevelMap view

How it relates to zones

MACD does not show a price level; it describes whether a move is speeding up or slowing down as it approaches a zone. A shrinking histogram on the way to a resistance zone can be read as the rise losing pace. Whether the zone holds is still decided by closes relative to the zone's edges.

Because of the lag, a MACD crossover often comes after price has already moved away from the zone. So price behaviour at the zone comes first, and MACD is read as a second observation that does or does not support it.

Often confused with

For general information only. Not investment advice.Last updated: