What Is MACD?
MACD (Moving Average Convergence/Divergence) is a trend indicator that subtracts a longer exponential moving average of price from a shorter one, producing a line that moves above zero when the shorter average is above the longer one (upward momentum) and below zero when the reverse is true (downward momentum). A signal line and a histogram are added to make direction changes in that relationship easier to see.
The Formula
MACD line = 12-period EMA − 26-period EMA.
Signal line = 9-period EMA of the MACD line.
Histogram = MACD line − Signal line.
MACD is built directly on top of the exponential moving average: the 12-period EMA reacts to price faster than the 26-period EMA, so the gap between them (the MACD line) widens when the shorter-term trend is accelerating away from the longer-term one, and narrows — or crosses zero — when the two converge.
Worked Example
Hypothetical example — for education only.
On a given day, a stock's 12-period EMA is $105.40 and its 26-period EMA is $102.10.
MACD line = 105.40 − 102.10 = $3.30
If the 9-period EMA of the MACD line (the signal line) is currently $2.80:
Histogram = 3.30 − 2.80 = $0.50
The MACD line is above both zero and the signal line, and the histogram is positive — read together, this describes a stock where the shorter-term average is pulling further ahead of the longer-term average, consistent with strengthening upward momentum. If the next day's MACD line rose to only $3.35 while the signal line rose to $3.10, the histogram would narrow to $0.25 — the same bullish alignment, but with momentum decelerating.
Common MACD Signals
Signal-line crossover
The MACD line crossing above the signal line is commonly read as bullish; crossing below, bearish. Because both lines are built from EMAs of price, this crossover confirms a momentum shift after it has already been building for some time — it does not catch the very start of the move.
Zero-line crossover
The MACD line crossing above zero means the 12-period EMA has moved above the 26-period EMA — a broader trend-direction signal than the signal-line crossover, and typically slower to trigger.
Histogram direction change
Because the histogram measures the gap between the MACD line and the signal line, it often starts shrinking — momentum decelerating — before the two lines actually cross. Some traders treat a histogram that peaks and turns back toward zero as an earlier, if less certain, warning than waiting for the crossover itself.
Divergence
Bearish divergence: price makes a higher high while the MACD line makes a lower high — upward momentum is weakening even as price advances. Bullish divergence: price makes a lower low while the MACD line makes a higher low — downward momentum is weakening. As with RSI divergence, this flags a disagreement between price and the indicator, not a confirmed reversal; it can persist or fail before price actually turns.
Standard and Alternative Settings
| Settings (fast, slow, signal) | Responsiveness | Common use |
|---|---|---|
| 5, 35, 5 | Slower, wider | Longer-term trend filtering |
| 12, 26, 9 | Balanced (default) | General-purpose swing/trend analysis |
| 8, 17, 9 | Faster | Shorter-term/intraday trading |
The default 12/26/9 setting is a convention, not a proven optimum for every asset or timeframe — shorter EMA pairs react faster to price at the cost of more crossovers in a choppy market.
Why MACD Produces False Signals
- Sideways markets — the MACD and signal lines can cross repeatedly with no sustained follow-through when price isn't trending.
- Signal-line crossovers arriving late — because both lines are EMAs, a genuine trend can already be well underway before the crossover confirms it.
- Divergence without price confirmation — a MACD divergence can appear well before, or fail to precede, an actual reversal.
- Ignoring the broader trend — a bullish MACD crossover against a strong prevailing downtrend has less follow-through, on average, than one aligned with it.
- Comparing MACD values across different-priced assets — MACD is expressed in the underlying asset's price units, so its absolute value isn't directly comparable between, say, a $10 stock and a $400 stock.
Common Mistakes
- Treating every signal-line crossover as a trade trigger — most traders pair it with trend or price-structure context first.
- Using MACD alone to time entries on a strongly ranging asset — it's a trend indicator, and it behaves choppiest exactly where there's no trend to measure.
- Confusing the histogram's shrinking with a crossover that hasn't happened yet — a shrinking histogram is a momentum warning, not a signal by itself.
- Applying default settings across every timeframe without checking whether they still fit — 12/26/9 on a 1-minute chart behaves very differently than on a weekly chart.
Limitations
MACD is a lagging indicator: every input is an EMA of past prices, so it confirms a momentum shift after it starts rather than predicting it. It also carries no information about volume, liquidity, order-book depth, or fundamentals, and its raw value is asset-price-dependent, which is why it's normally read for its direction and crossovers rather than compared directly across different assets.
MACD FAQs
What does MACD stand for?
Moving Average Convergence/Divergence. It measures the relationship between two exponential moving averages of price to gauge whether trend momentum is strengthening or fading.
What is a MACD crossover?
A MACD crossover is when the MACD line crosses the signal line. A cross above is commonly read as bullish; a cross below, bearish. Both are lagging signals derived from moving averages.
What is the MACD histogram?
The histogram plots the difference between the MACD line and the signal line as bars. It shrinks toward zero as the two lines converge and grows as they diverge, often changing direction before the lines actually cross.
What are the standard MACD settings?
A 12-period EMA, a 26-period EMA, and a 9-period EMA of the MACD line as the signal line — written as MACD(12,26,9).
Is MACD a leading or lagging indicator?
Lagging. It's built from moving averages, which are calculated from past prices, so it confirms momentum shifts after they begin rather than predicting them in advance.
Can MACD be used with RSI?
Yes — MACD (trend) and RSI (momentum) answer different questions and are commonly paired, though both ultimately derive from the same price series and can still agree or disagree depending on market conditions.
Related Reading
- SMA vs. EMA explained — the moving averages MACD is built from.
- RSI explained — a momentum indicator often paired with MACD.
- Technical indicator library — browse indicators by category.