MASTERMINDREADING ROOM阅览室
Lesson课程 · Technical analysis技术分析

MACD: Construction, Lag, and What the Histogram Means

MACD uses three EMAs (12, 26, 9). Learn the exact recurrence formula, what the histogram represents, and why lag is a structural cost, not a bug to fix.

Published发布 2026-07-20
Learning objective Understand how MACD is constructed from three EMAs, what the histogram represents as a derivative of the signal relationship, and why lag is not a flaw but a structural trade-off built into the EMA recurrence.

MACD stands for Moving Average Convergence Divergence. It measures the distance between a fast exponential moving average and a slow one — compressing the question "is price accelerating or decelerating relative to its recent trend?" into a single line that crosses zero.

Construction: the exact EMA recurrence

EMA recurrence (α = 2/(n+1)): EMA(t) = Close(t) × α + EMA(t−1) × (1 − α)

Standard parameters: fast n=12, slow n=26, signal n=9 α_fast = 2/(12+1) ≈ 0.1538 α_slow = 2/(26+1) ≈ 0.0741 α_signal = 2/(9+1) = 0.2000

MACD line = EMA(12) − EMA(26) Signal line = EMA(9) of the MACD line Histogram = MACD line − Signal line

The 12/26/9 parameters were popularized by Gerald Appel in the 1970s for daily equity charts. They are conventional, not mathematically optimal for any particular market or timeframe.

Worked example

Worked example

Suppose at bar t, EMA(12) = 105.40 and EMA(26) = 103.80.

MACD line = 105.40 − 103.80 = 1.60

Now suppose the signal line (the 9-period EMA of MACD) stands at 1.20.

Histogram = 1.60 − 1.20 = +0.40

The positive histogram means the MACD line is above its own signal — the gap between the fast and slow EMA is currently wider than its recent average. A histogram that is still positive but shrinking means the gap is still positive but narrowing — momentum is decelerating, but direction has not yet reversed.

What the histogram actually represents

The histogram is a second derivative: it measures the rate of change of the distance between two smoothed averages. A rising histogram means the spread between fast and slow EMA is expanding — the faster average is pulling away from the slower one. A falling histogram means the spread is contracting, even if both averages are still pointing up. The histogram crosses zero when the MACD line crosses its signal line — not when price reverses. These are different events.

Signal-cross mechanics

A bullish signal cross occurs when the MACD line crosses above the signal line — the fast-minus-slow spread has gone from contracting to expanding in the upward direction. A zero-line cross occurs when the MACD line itself crosses zero — meaning the 12-period EMA has crossed above the 26-period EMA. The zero-line cross is a slower, more significant event than the signal-line cross. Many implementations generate far more trades from signal crosses than from zero-line crosses.

Common trap: cross-trading in choppy markets

MACD signal crosses generate frequent whipsaws in range-bound, directionless price action. Because both the MACD line and signal line are themselves smoothed, a sideways market produces a tight cluster of MACD values near zero with signal crosses firing as random noise. The indicator was designed to surface trend momentum — in the absence of a trend, it has no meaningful signal to surface. Using MACD crosses as entry triggers in a ranging market is a category mismatch: the instrument is not built for that regime.

Lag as structural cost

Lag in MACD is not a flaw to be engineered away — it is the direct consequence of the EMA smoothing that removes short-term noise. The 26-period EMA has α = 0.074, meaning each new price contributes about 7.4% to the smoothed value. Past prices dominate the calculation. The MACD line by construction cannot identify a trend until several bars of that trend have already occurred. This means MACD entries are always late relative to the actual turning point, and MACD exits are always late relative to the actual top or bottom. The trade-off: smoother signal, fewer false alarms, but always at the cost of giving back some of the move.

When this breaks

MACD breaks down as a signal in two conditions: high-frequency data and very slow or illiquid markets. On intraday timeframes shorter than 15 minutes, microstructure noise overwhelms the EMA smoothing and the histogram becomes nearly random. In thinly traded names, a single large print can move both EMAs meaningfully and produce a signal cross that reflects a single transaction, not a directional shift. The 12/26/9 parameters were also calibrated for daily commodity data in the 1970s — applying them to modern equities, crypto, or intraday bars without re-evaluating the parameters is an inherited assumption worth examining.

To see how a price-and-volume reference like VWAP complements a pure-momentum indicator like MACD, continue to: VWAP and Anchored VWAP.

Self-check: 3 questions
  1. The MACD histogram is positive and rising. What does that mean in terms of the underlying EMAs?
    The MACD line (EMA12 − EMA26) is above its signal line and the gap is growing. That means the 12-period EMA is not only above the 26-period EMA, but is moving away from it at an increasing rate — upward momentum is accelerating.
  2. A trader uses daily MACD(12,26,9) on a stock and gets a signal cross. Two days later, a second signal cross fires in the opposite direction. What is likely happening and what does this suggest about the indicator's use?
    The stock is likely range-bound or choppy, generating MACD values near zero where signal crosses fire as noise. This is the whipsaw regime MACD is not designed for. A discretionary overlay (such as a trend filter or volume confirmation) would typically be needed to filter these crosses.
  3. What is the zero-line cross in MACD, and why is it a slower event than the signal-line cross?
    The zero-line cross is when the MACD line itself (EMA12 − EMA26) crosses zero, which means the fast EMA has crossed above or below the slow EMA. Because the slow EMA (26-period) is heavily smoothed, this only happens after a sustained directional move. The signal-line cross (MACD vs. its 9-period EMA) fires more often and earlier because the signal line is much more responsive than the underlying EMAs.