The MACD indicator: calculation and interpretation
MACD (Moving Average Convergence Divergence) shows trend direction and momentum together, using the gap between two exponential moving averages. Gerald Appel developed it in the 1970s.
The three parts of MACD
- MACD line: the difference between a short and a long EMA. With the default setting,
MACD = EMA12 − EMA26. - Signal line: a 9-period EMA of the MACD line.
- Histogram: the difference between the MACD line and the signal line, drawn as bars.
Example: with a 12-day EMA of 105 and a 26-day EMA of 102, the MACD line = 105 − 102 = 3. With a signal line of 2, the histogram = 3 − 2 = 1. Our moving averages guide explains how EMAs are calculated.
How to read MACD
- Signal crossover: the MACD line crossing above the signal line is a bullish signal, crossing below a bearish one. The histogram moving above zero marks the same moment.
- Zero line: MACD above zero means the short EMA is above the long EMA, so the short-term trend is up. A zero-line cross is a later but stronger sign of a trend change.
- Histogram length: growing bars mean momentum is building; shrinking bars, fading. The histogram can show weakening before a crossover.
- Divergence: if price makes a new high while MACD makes a lower high, the rally may be losing strength; if price makes a new low while MACD makes a higher low, the decline may be weakening.
Settings
12-26-9 is the most common setting and was designed for daily charts. Shorter periods (for example 5-35-5) make MACD more sensitive and produce more signals; longer ones give fewer but more reliable signals. On a weekly chart, the default setting compares roughly 3-month and 6-month averages.
Limitations
MACD is derived from moving averages, so it lags. In sideways markets the MACD and signal lines cross often and produce many false signals. Because MACD is measured in price units, MACD values of different stocks can't be compared directly. Used together with the RSI, which measures overbought and oversold conditions, it gives a more balanced picture.
MACD in Gonofin
- MACD is added to the technical chart as a lower pane; the default setting is 12, 26, 9 and can be changed.
- In Gonofin the MACD line is labelled DIF and the signal line DEA.
- Gonofin calculates the histogram as 2 × (DIF − DEA), a convention common on some platforms; the bars are twice as tall as on platforms that plot the plain difference. Direction and crossover points are the same.
- You can set alerts on MACD, for example “DIF crosses above DEA” or “histogram crosses above zero”. See price and indicator alerts.
This guide is for information only and is not investment advice. No indicator guarantees future price movements.
Last updated: