MACD — moving average convergence divergence — is the distance between two exponential moving averages of closing price. The standard build subtracts the 26-period EMA from the 12-period EMA; that difference is the MACD line. A 9-period EMA of the MACD line becomes the signal line. The histogram plots MACD minus signal as bars around zero. That is the whole indicator: two subtractions plus one extra layer of smoothing, computed from closes alone.
What it measures is narrow but useful: whether the short-horizon average of price is pulling away from the long-horizon average (trend accelerating) or converging back toward it (trend stalling). Because every component is an average — the signal line is an average of an average — MACD describes turns after they have begun. A crossover on your screen summarizes bars that already printed; it is not a forecast of the next one. Everything below follows from that single fact.
The exact construction
An exponential moving average updates as EMA_today = k × close + (1 − k) × EMA_yesterday, with k = 2 / (N + 1):
- 12-period EMA: k = 2/13 ≈ 0.154
- 26-period EMA: k = 2/27 ≈ 0.074
- 9-period signal EMA: k = 2/10 = 0.200
Two structural facts follow. First, the zero line has a concrete meaning: MACD above zero says nothing more than "the 12 EMA is above the 26 EMA." Second, MACD is unbounded and scale-dependent. A +8.00 reading on a product trading near 5,000 is modest; +8.00 on a product near 80 would be extreme. Readings are not comparable across instruments, or even across years on the same instrument once price has traveled far — the percentage price oscillator (PPO) exists to normalize this, dividing the EMA spread by the slower EMA.
How much it lags, in bars
An EMA with smoothing factor k carries a mean lag of (1 − k)/k bars, which simplifies to (N − 1)/2. The 12-period EMA is centered roughly 5.5 bars in the past and the 26-period roughly 12.5 bars back; the signal line stacks about 4 more bars of average lag on top of the MACD line. A signal-line cross on a 5-minute chart is therefore built from information centered somewhere between 45 minutes and an hour and a half in the past, depending on which component you weight.
None of this is a flaw. Smoothing exists to suppress noise, and lag is the fee the filter charges. The error is category confusion: treating a crossover as fresh information about the coming bar when it is a well-filtered statement about the recent past.
The three standard reads
Signal-line crossovers
MACD crossing above its signal line is the textbook long trigger; crossing below, the short. In a trending market the crossover keeps you positioned with the move for most of its length. The losing environment is the range: sideways, the two lines braid around each other and each cross fires near the worst price of the rotation, with commissions plus slippage compounding the churn. A crossover system's equity curve is a bet on how often the instrument trends, and most instruments spend more time rotating than trending.
Zero-line crosses
The MACD line crossing zero marks the 12 EMA overtaking the 26 — a slower, sturdier confirmation that trend direction changed. Its cost is entry quality: by the time the spread flips sign, a large share of the move has already printed, and in a broad rotation the zero line gets recrossed repeatedly with no follow-through, delivering late entries at poor prices in both directions.
Histogram inflections
The histogram shrinking toward zero shows MACD converging on its own signal — deceleration visible before any cross completes. This is the earliest read the indicator offers and the least reliable; on fast timeframes the histogram flips bar to bar. Acting on every contraction produces the highest trade count of the three reads with the thinnest per-signal edge, because most contractions resolve as pauses inside the move rather than turns against it.
Divergence, read honestly
Bearish divergence: price prints a higher high while the MACD line or histogram peak prints a lower high. Bullish divergence is the mirror image. The certified content is narrow — the second push reached a new extreme with less spread between the fast and slow averages. The move decelerated. Nothing in the arithmetic says it will reverse.
The failure mode lives in strong trends, which decelerate constantly without ending. Pullbacks grow shallower and new extremes get ground out instead of launched, while the indicator stamps divergence after divergence onto a move that keeps going. Serial divergence is a signature of a durable trend more often than a topping pattern. A trader fading each one takes a string of counter-trend entries; the losses are individually small but collectively steady, and the eventual winner rarely repays the sequence. That is the honest ledger: divergence loses most exactly when it appears most abundant.
Divergence earns weight only with corroboration from outside the indicator:
- price is interacting with a level that existed before the divergence did, and
- the tape shows the aggressor side working harder for shrinking progress (next section).
Settings myths
A commonly repeated account traces the 12/26/9 defaults to Gerald Appel's work in the late 1970s, with 12 and 26 approximating two weeks and one month under the six-day trading weeks of an earlier market era. Whatever the true origin, the numbers are conventions, not constants of nature.
The persistent myth is that a best MACD setting for day trading exists. Every parameter choice is a point on one tradeoff curve: shorter periods cut lag and admit noise; longer periods filter noise and add lag. Halving the periods makes the indicator fire earlier and be wrong more often. No setting escapes the curve, because the input — past closes — is identical at every speed.
Backtest-optimized settings are the same myth with more decimals. An optimizer will always crown some parameter set for a given instrument and window; the crown tends to fail out-of-sample because it was fitted to that window's particular mix of trend and rotation.
A third myth is stacking several MACDs at different speeds and calling their agreement confluence. They are one calculation sampled at different rates on identical inputs; their agreement is close to guaranteed and carries almost no independent information.
Founder note: I keep the stock 12/26/9 on the single chart where I run MACD at all. Stable parameters mean my eye learns one instrument's normal histogram amplitude — re-optimizing would reset that learning every month for no measurable gain.
What volume and order flow change
MACD consumes closing prices and nothing else. It registers that price moved; it cannot see how much traded to move it or which side initiated the trades. Two identical crossovers can sit on opposite tapes: one printed on expanding volume with initiative buying lifting offers bar after bar, the other printed in a thin overnight session where a few hundred contracts walked price the same distance. The indicator treats them as the same event. Order flow is how you tell them apart.
The highest-value pairing is divergence plus delta. A bearish MACD divergence says the second push decelerated; cumulative delta says whether aggressive buyers were still committing into it. When delta surges to a strong new high while price barely improves, the divergence has a mechanism underneath it — heavy buying absorbed by passive selling, effort without result. When the push was thin and delta flat, the "divergence" may be nothing more than the arithmetic echo of a small pullback two swings ago.
Flow context filters signals; it does not repeal the underlying problem. A decelerating push into absorption still resolves higher whenever the passive seller pulls their size. Adding the tape shrinks the set of divergences worth acting on, and the survivors still lose when larger resting interest steps aside.
Before acting on any MACD signal
- Classify the regime first. Crossover reads are trend tools; deceleration reads belong near the edges of a rotation. Applying either in the wrong regime is the largest single source of MACD losses.
- State what the lag hides. The signal is centered several bars in the past — check whether price has already traveled somewhere that makes the trade's location unacceptable.
- Demand participation evidence. Volume expansion or delta agreement turns a derived-price signal into a corroborated one; their absence is information too.
- Write the invalidation before entry. A MACD signal has no built-in stop — the lines can stay crossed while price moves against you indefinitely.
- Keep a tally by regime. A month of logged signals shows where the indicator pays its way on your instrument and where it quietly bleeds.