MACD (Moving Average Convergence Divergence) explained
Educational content only. Trading carries a risk of loss and nothing here guarantees a profit.
MACD compares a fast and a slow exponential moving average (EMA) to show how momentum is changing. Gerald Appel developed it in the late 1970s. It is built from past prices and lags the market, so it describes what has happened rather than predicting what will.
On this page
What MACD measures
The distance between a fast and a slow EMA widens when price is accelerating in one direction and narrows when it slows. MACD plots that distance, a smoothed version of it (the signal line) and the gap between the two (the histogram).
How it is calculated
MACD line = EMA(12) − EMA(26)
Signal line = EMA(9) of the MACD line
Histogram = MACD line − signal line (added later by Thomas Aspray)
The numbers 12, 26 and 9 are conventions, not rules.
How traders read it
- Signal-line crossover: the MACD line crossing the signal line is often watched, but in sideways markets it can produce many small losing trades.
- Zero line: MACD above zero means the fast EMA is above the slow EMA.
- Histogram: a shrinking histogram suggests momentum is fading; a growing one suggests it is building.
- Divergence: price and MACD moving differently can hint at weakening momentum, but it is not a reliable standalone signal.
Common mistakes
- Trading every crossover.
- Using it in a range-bound market without allowing for whipsaws.
- Changing settings to fit past data.
- Entering without a defined stop level.
When it works poorly
Sideways markets, abrupt news gaps, and low-liquidity periods. Because it lags, it can signal after much of a move has already happened.
Combining it with other information
Higher-timeframe trend, support and resistance, and volatility give context. Decide where the idea is invalidated, size the position from that distance, and include costs in testing.
→ Technical analysis basics · → RSI explained · → Risk management
Frequently asked questions
What do 12, 26 and 9 mean?
They are the look-back lengths, in periods, of the fast EMA, the slow EMA and the signal EMA. They are conventions; other settings exist.
Is a MACD crossover a buy signal?
No. A crossover shows a change in the relationship between two averages. Whether it is useful depends on market conditions, timeframe, costs and your risk rules.
Further reading
- Gerald Appel, Technical Analysis: Power Tools for Active Investors (2005)