MACD (Moving Average Convergence Divergence)
Built from EMAs -- MACD line, signal line, histogram, zero-line crossovers, and why it bridges trend and momentum.
What is MACD?
MACD (Moving Average Convergence Divergence) measures the relationship between two exponential moving averages of the price. When the faster EMA pulls away from the slower one, momentum is building. When they converge back together, momentum is fading.
MACD is one of the most widely used indicators in technical analysis. It sits at the intersection of trend and momentum -- the EMA crossover at its core is a trend signal, but the speed at which the gap changes is a momentum signal. This dual nature is why MACD appears in both trend-following and momentum strategies.
The Three Components
MACD produces three outputs, displayed together in a panel below the price chart:
Signal Types
Signal line crossover
When the MACD line crosses above the signal line, it is a bullish signal (the histogram turns from negative to positive). When it crosses below, it is bearish (the histogram turns from positive to negative). This is the most common MACD signal and is equivalent to saying "short-term momentum is shifting."
Zero-line crossover
When the MACD line crosses above zero, the 12-period EMA has crossed above the 26-period EMA -- a bullish trend signal. When it crosses below zero, the fast EMA has dropped below the slow EMA -- a bearish trend signal. Zero-line crossovers are slower than signal-line crossovers but are considered more significant.
MACD divergence
When the price makes a new high but the MACD line makes a lower high, momentum is fading even though the price is still rising (bearish divergence). The reverse -- price makes a lower low but MACD makes a higher low -- suggests selling momentum is weakening (bullish divergence). This is the same concept as RSI divergence, applied to MACD.
Parameters
The default 12/26/9 combination is the most widely used. It was popularized by Gerald Appel, who developed MACD. Changing these values is possible in Simula (range: 3-100 for each), but the defaults are a reasonable starting point for most assets and timeframes.
Things to Watch Out For
MACD is a lagging indicator
Because MACD is built from EMAs, it always reacts after the price has already moved. Signal-line crossovers confirm that momentum has shifted -- they do not predict it in advance. The faster you make the parameters, the earlier the signals but the more false crossovers you will see.
Whipsaws in ranging markets
When the price moves sideways, the two EMAs stay close together and the MACD line hovers near zero. Small fluctuations cause frequent crossovers that generate losing trades. Check ADX before acting on MACD signals -- if the trend is weak, MACD crossovers are unreliable.
The histogram is not volume
MACD histogram bars look like volume bars, but they measure the gap between the MACD line and the signal line -- nothing to do with trading volume. A shrinking histogram means the MACD and signal lines are converging, not that volume is declining.
Where to Go Next
ADX -- pair with MACD to filter out signals during weak trends.
EMA -- the building block that MACD is constructed from.
Trend Indicators Overview -- all 12 trend indicators available in Simula.
Trend Following -- strategies that use MACD crossovers as entry/exit signals.