MACD (Moving Average Convergence Divergence)
A trend oscillator that graphs the 'difference' between two moving averages. Signal crosses, the zero line, divergence — how it works, and the lag trap everyone falls into.
Overview
MACD (Moving Average Convergence Divergence), devised by Gerald Appel in the 1970s, is among the most widely used indicators in technical analysis.
The idea is simple: graph the "difference" between a short and a long moving average in a separate panel. Think of it as amplifying the convergence and divergence of two moving averages to make it easier to see. The selling point: it catches changes in trend momentum earlier than the moving averages themselves.
But "earlier than moving averages" only means moving averages are slow — MACD is still a lagging indicator. This article covers that limit honestly.
Components
1. The MACD line
The short EMA (exponential moving average) minus the long EMA. Standard settings:
Formula
MACD line = 12-period EMA − 26-period EMA
- MACD line positive (above zero) → short EMA above long EMA → upward bias
- MACD line negative (below zero) → short EMA below long EMA → downward bias
- MACD line near zero → the two moving averages are about to cross
2. The signal line
The MACD line, further smoothed. Standard:
Formula
Signal line = 9-period EMA of the MACD line
A "moving average of the MACD line" — it smooths the MACD line's sharp moves and confirms direction.
3. The histogram (bars)
The difference between the MACD line and the signal line.
Formula
Histogram = MACD line − signal line
- Histogram positive and expanding → upward momentum increasing
- Histogram positive and contracting → upward momentum fading (a cross is near)
- Crossing zero → the MACD line and signal line cross
The histogram signals acceleration/deceleration earliest — the most-watched part of MACD.
Basic Signals
1. Signal cross
- MACD line crosses above the signal line → buy signal (a MACD golden cross)
- MACD line crosses below the signal line → sell signal (a MACD dead cross)
Same idea as a moving-average golden/dead cross, but earlier (taking a difference makes it sharper).
2. Zero-line cross
- MACD line crosses above zero → the short EMA crossed above the long EMA = the moving averages' own golden cross
- MACD line crosses below zero → likewise a dead cross
The zero-line cross is slower than the signal cross but suggests a larger trend change.
3. Divergence
The most valuable use of MACD, by most accounts.
- Bullish divergence: price makes lower lows but MACD (or the histogram) makes higher lows → the down-momentum is weakening internally → a bottoming hint
- Bearish divergence: price makes higher highs but MACD makes lower highs → the up-momentum is weakening internally → a topping hint
Divergence tells you "price is still moving in the trend direction, but the energy supporting that move is draining".
How to Use It
How to Read
OANDA:USDJPY
As a confirmation in trend-following
- Judge "uptrend" via Dow Theory / trend lines
- MACD line above zero and histogram positive → the trend has backing
- On a pullback-buy, if the histogram turns from contracting to expanding, momentum has returned
- If the histogram peaks and turns to contracting in positive territory, consider taking partial profit
Use MACD not as a standalone buy/sell signal but as a tool to confirm the momentum of a trend judged by other evidence. That is the least error-prone use.
As a reversal warning via divergence
- Price makes a new high
- But the MACD (especially the histogram) peak is lower than the previous one → bearish divergence
- Don't sell on this alone; enter a "this might be a top" alert mode
- If a Dow structural breakdown (a break of the recent higher low) or a candle reversal follows, then judge it a turn
Divergence is a warning, not a signal. Price often runs much further after divergence appears ("divergence begets divergence").
Limitations
- Lagging indicator: by the time a signal appears, the trend is underway
- Useless in ranges: frequent crosses, all fakeouts
- Divergence is a warning, not a signal: price can run further after it appears
- Parameter-dependent: 12-26-9 is a convention, not an optimum (optimising it is curve-fitting)
Related Studies
- Moving Average — the raw material of MACD
- Bollinger Bands — using a moving average from another angle
- RSI — another classic divergence indicator
Related Studies