MACD
An indicator built on the relationship of two moving averages and a momentum histogram. It helps confirm the pace of a move — signals need trend context.
Definition
MACD (Moving Average Convergence Divergence) is a momentum indicator described by Gerald Appel, built from three elements: the MACD line, the signal line and the histogram. It is derived from the difference between two exponential moving averages of price, by default EMA12 and EMA26, so it has no bounded range — in a strong move it reaches values measured in the instrument’s points. It is not an oscillator confined to a 0–100 range like RSI. It is also not a decision in itself: a crossover read without the price structure only describes the history of two moving averages.
How it works
MACD line = EMA12 − EMA26. The signal line is an EMA9 of the MACD line, and the histogram = MACD − signal. The EMA multiplier is k = 2 ÷ (n + 1), that is 0.1538 for 12 periods, 0.0741 for 26 and 0.2 for 9; each new value updates the average by k × (price − EMA). A MACD crossover above the signal line is read as an advantage for buyers, a fall below zero as a change of sides in the market. Double smoothing — an EMA9 of the difference between EMA12 and EMA26 — delays the reaction by several bars, so the crossover confirms a move rather than announcing it.
Example
An index trades at 5,000 points, EMA12 is 5,020 points and EMA26 is 5,000 points, so MACD = +20 points. The signal line stands at 14 points, so the histogram = +6 points. After a session down 15 points, EMA12 falls to 5,020 − 0.1538 × 15 ≈ 5,017.7 and EMA26 to 5,000 − 0.0741 × 15 ≈ 4,998.9, which gives MACD ≈ 18.8 points. The signal updates to 14 + 0.2 × (20 − 14) = 15.2 points, and the histogram shrinks from 6 to 3.6 points — the price fell 15 points, but the histogram lost 40% of its value.
In practice
MACD works as a filter, not a trigger: the absence of divergence at a new high supports continuation, and divergence is a signal to tighten risk. Watch out for noise — on M5 crossovers appear a dozen or so times a day, and spread and commission turn them into a cost. With a 1-point spread and 12 signals per session over 20 sessions, entering and exiting alone costs 480 points. You pay 19% capital gains tax on the profits, so frequent entries cut the net result faster than the gross one, and a history of tuned parameters does not protect against that cost.
Anti-example / common mistake
Trading every MACD crossover on M5 without looking at the price structure. The default 12/26/9 on a five-minute chart produces a dozen or more signals per session, and in a quiet market the difference between the MACD line and the signal line rarely exceeds 2–3 points, less than the spread. The second mistake is optimizing the parameters for one backtest: switching from 12/26/9 to 5/35/5 improves the historical result but increases the number of crossovers and the cost, while robustness to new data falls.
Related lessons
Structure sources
Materials behind this definition — documentary sources, not recommendations.
- ChartSchool (StockCharts) — MACD — chartschool.stockcharts.com