GlossaryMACD (Moving Average Convergence Divergence)
MACD (Moving Average Convergence Divergence)
The MACD (Moving Average Convergence Divergence) shows the distance between a fast and a slow exponential moving average of the close. It combines trend direction and momentum: when the distance grows, the move is accelerating; when it shrinks, the move is fading.
Calculation
is the close, the length of the Fast EMA, that of the Slow EMA and the Signal smoothing.
EMA. Each exponential moving average starts with the simple mean of its first input values and then continues recursively:
MACD line (blue):
It begins only once both averages exist, that is, from candle .
Signal line (orange), an EMA of the MACD line, not of the price:
Its starting value is the mean of the first MACD values. It therefore begins from candle , from candle 34 with the default settings.
Histogram (columns):
How to read it
The lines
- Zero line: Above zero, the fast EMA is above the slow one and the price is rising over this horizon. A move above or below zero is exactly the crossover of the two EMAs.
- Signal crossover: If the MACD line crosses the signal line upward, momentum turns up; downward, it turns down.
- Divergences: A new price high with a lower MACD high shows fading momentum, and the mirror image applies at a low.
The histogram
Each column is compared with the previous one. This gives four colors:
| Column | Color | Meaning |
|---|---|---|
| above zero, higher than the previous one | strong green | MACD above signal, distance growing |
| above zero, lower than the previous one | light green | MACD above signal, distance shrinking |
| below zero, lower than the previous one | strong red | MACD below signal, distance growing |
| below zero, higher than the previous one | light red | MACD below signal, distance shrinking |
The color change comes before the crossover: when the columns shrink, the lines are already converging.
Settings
| Setting | Default | Effect |
|---|---|---|
| Fast EMA | 12 | Length of the fast average (2–50). |
| Slow EMA | 26 | Length of the slow average (2–100). |
| Signal smoothing | 9 | Length of the EMA over the MACD line (2–50). |
The settings don't check whether the fast EMA is shorter than the slow one. If you set it longer, the sign of the MACD flips.
Limitations
- The MACD is a distance in price units. Its height is not comparable across symbols and price levels; what counts are direction, crossovers and divergences.
- Both lines lag the price. In sideways phases they often cross without a trend following.