What it measures
Moving average convergence divergence measures the distance between a fast and a slow exponential average. When the fast one pulls away upward the trend is accelerating; when the gap narrows the trend is losing pace. It is a trend indicator expressed as momentum, which is why it is filed under both.
The calculation
MACD line = EMA(close, 12) − EMA(close, 26) signal line = EMA(MACD line, 9) histogram = MACD line − signal line
The histogram is the gap between the other two, so it turns before either of them does.
Inputs and defaults
- Fast, slow, signal lengths: 12, 26, 9, Gerald Appel's originals, chosen in the era of six-day trading weeks and never seriously revised.
- Source: close.
How it is read
Three ways. Signal-line cross: MACD crossing above its signal is a buy, below a sell; this is what most strategies code. Zero-line cross: MACD above zero means the 12 EMA is above the 26, a trend definition. Divergence: price makes a new high while the MACD line makes a lower one.
Where it fails
It is built from two lagging averages and smoothed again, so the signal cross arrives after the move has started and the exit cross after it has ended. In a range the two lines braid around each other and every cross is a loss. The histogram is the fastest part and the noisiest; rules that trade the histogram's turn have many more trades than rules that trade the cross.
How the desk reads it
In the screen, MACD-cross strategies behaved like the EMA-cross strategies they are, with the same whipsaw cost in the sideways months. The desk reads a MACD rule on its trade count and on whether the histogram or the signal cross is the trigger, because the two differ by a factor of several in trades.
In the desk's screen
Of the 614 screened strategies in the library, 61 (9.9%) use this indicator somewhere in their logic.
23 of those were gross-profitable on enough cells to reach the after-fee replay.
- Adaptive Multi-Factor Swing Strategy Joining a move · after-fee replay
- Adaptive Multi-Factor Swing Strategy V22 - Position Direction Guard Joining a move · after-fee replay
- BNM INTRADAY SETUP MACD 3M - Version 1.2 Many small trades · after-fee replay
- Crypto Swing EMA Colour Strategy Plus Joining a move · after-fee replay
- D_Rock's MA Strategy Trading activity · after-fee replay
- Estrategia Multi-Indicador INTELIGENTE - V2.1 CORREGIDA Betting on a snap-back · after-fee replay
- Express Generator Strategy Joining a move · after-fee replay
- FLI + STC + MACD + EMA Strategy v1 Breakout · after-fee replay
- Gold Pro Strategy Joining a move · after-fee replay
- MACD Aggressive Scalp Simple Many small trades · after-fee replay
- MACD Liquidity Tracker Strategy [Quant Trading] Chart turning points · after-fee replay
- MACD Volume Strategy (BBO + MACD State, Reversal Type) Betting on a snap-back · after-fee replay
The count is read from the compiled code of each strategy in the library; a strategy that computes the indicator by hand under another name is not counted. The desk's own rules are not part of the count.