MACD (Moving Average Convergence Divergence)
By Chad Smith, Director of Research & Analysis · Updated
On this page
MACD, short for Moving Average Convergence Divergence, measures the distance between two exponential moving averages and tracks how that distance changes. Gerald Appel developed it in the late 1970s, and the histogram was added later by Thomas Aspray. It combines trend direction and momentum in one panel, which is why it is among the most widely used indicators.
What it measures
MACD measures whether a short-term average is pulling away from or closing toward a longer-term average. When the fast EMA rises faster than the slow EMA, the gap widens and MACD rises. When the fast EMA slows down, the gap narrows. That convergence and divergence of the averages gives the indicator its name.
The panel has three parts:
- MACD line: the fast EMA minus the slow EMA.
- Signal line: an EMA of the MACD line.
- Histogram: the MACD line minus the signal line.
Each part answers a slightly different question. The MACD line shows trend bias. The signal line smooths it. The histogram shows whether momentum is accelerating or slowing.
The formula
MACD line = EMA(Close, 12) − EMA(Close, 26)
Signal line = EMA(MACD line, 9)
Histogram = MACD line − Signal line
where EMA(x, n) is the exponential moving average of x over n periods
Worked example (illustrative numbers). Suppose on a given day the 12-period EMA is 101.50 and the 26-period EMA is 100.00. The MACD line is 1.50. If the 9-period EMA of recent MACD values (the signal line) is 1.20, the histogram is 1.50 − 1.20 = 0.30. A positive histogram means the MACD line is above its signal line, so short-term momentum is stronger than its own recent average. If on the next day the MACD line falls to 1.30 and the signal line rises to 1.25, the histogram shrinks to 0.05, showing momentum fading even though both averages are still in bullish order.
Default settings
| Component | Conventional value |
|---|---|
| Fast EMA | 12 |
| Slow EMA | 26 |
| Signal EMA | 9 |
| Source | Close |
These are the standard 12/26/9 settings. Some traders use faster combinations such as 5/35/5 for earlier signals, or slower ones for weekly charts. MACD is built into MetaTrader, TradingView and other major platforms. Some versions draw the MACD line itself as bars instead of plotting a separate histogram, so check which part you are reading.
How to read it
Above or below zero. When the MACD line is above zero, the fast EMA is above the slow EMA, which suggests an uptrend. Below zero suggests a downtrend. The zero line is the same point at which a 12/26 EMA crossover would occur on the price chart.
Signal line crosses. A MACD line crossing above its signal line is a bullish signal; crossing below is bearish. These crosses come earlier than zero-line crosses but are noisier.
Histogram. The histogram shows the gap between MACD and its signal. When bars grow, momentum is building. When they shrink toward zero, momentum is fading. A histogram turning from shrinking to growing often happens before a signal line cross.
Divergence. If price makes a higher high while MACD makes a lower high, momentum is weakening behind the advance. The reverse at lows is bullish divergence.
MACD vs RSI and moving average crossovers
MACD and RSI both measure momentum, but RSI is bounded between 0 and 100 and compares gains with losses, while MACD is unbounded and compares two averages. RSI is better at describing stretched conditions. MACD is better at describing trend shifts and the pace of a trend.
Compared with a plain two-EMA crossover on the price chart, MACD shows the same information plus more. The zero cross is the crossover. The signal line and histogram add an earlier view of when the gap starts to shrink.
The percentage price oscillator uses the same idea but divides the gap by the slow EMA, which allows comparison across markets with different prices. TRIX is another momentum tool built from smoothed EMAs.
Common strategies
Signal line crossover
Buy when MACD crosses above the signal line and sell when it crosses below. Many traders only take crosses in the direction of the zero line, for example bullish crosses while MACD is above zero.
Zero-line trend filter
Use MACD above zero as permission to look for long setups, and below zero for short setups. Entries are then timed with price action or a faster tool.
Histogram turns
A shift from falling to rising histogram bars can mark the end of a pullback in an uptrend. This is earlier than a signal line cross but less confirmed.
Divergence with price structure
MACD divergence near a level of resistance, or alongside a head and shoulders pattern, carries more weight than divergence in the middle of a range.
Weaknesses
MACD lags because it is made of moving averages. Crossovers appear after price has already turned, and the signal line adds another layer of delay.
It whipsaws in ranges. When price moves sideways, MACD oscillates around zero and the signal line, producing many crosses that lead nowhere.
It has no fixed scale. Readings depend on price level and volatility, so a MACD value of 2 means something different on a stock priced at 50 than on one priced at 500. This makes overbought and oversold levels unreliable.
Divergence can last a long time. Momentum can weaken for several swings while price keeps trending.
Indicators it pairs with
- RSI, for a bounded momentum reading alongside MACD's trend view.
- ADX, to confirm that a trend is present before acting on MACD crosses.
- A 200-period moving average, to define the main trend direction.
- Volume tools such as OBV, to check participation behind MACD signals.
- ATR, to set stops and targets around MACD-based entries.
The technical analysis course shows how MACD fits into a broader method built on trend, momentum and price structure.
Brokers with strong charting to practice on
Put this into practice on a demo account first, with no money at risk.
- Featured broker
Pepperstone4.7 / 5Visit
IC Markets4.9 / 5Visit
GO Markets4.8 / 5Visit
Frequently asked questions
What do the MACD numbers 12, 26 and 9 mean?
The 12 and 26 are the lengths of the fast and slow exponential moving averages used to build the MACD line. The 9 is the length of the exponential average that forms the signal line.
What is the MACD histogram?
It is the MACD line minus the signal line, drawn as bars. Growing bars show momentum building in one direction, and shrinking bars show it fading.
Is MACD a trend or momentum indicator?
It is both. It is built from moving averages, so it follows trend, but it measures the gap between them, which reflects momentum.
What does a MACD zero-line cross mean?
When the MACD line crosses above zero, the 12-period EMA has moved above the 26-period EMA. A cross below zero means the fast average has dropped below the slow one.
Why is MACD not bounded like RSI?
MACD is measured in price units rather than on a fixed scale, so its range depends on the market's price and volatility. That makes overbought or oversold levels hard to define.