What Is the MACD Indicator?
The Moving Average Convergence Divergence (MACD) is one of the most popular and versatile technical indicators in trading. Developed by Gerald Appel in the late 1970s, it reveals changes in the strength, direction, momentum, and duration of a trend by analyzing the relationship between two exponential moving averages.
MACD is a unique indicator because it functions as both a trend-following tool and a momentum oscillator. It tells you not only which direction the trend is moving, but also whether the momentum behind the trend is accelerating or decelerating. This dual nature makes it an excellent foundation for trading systems across stocks, forex, commodities, and cryptocurrency.
How MACD Is Calculated
The MACD consists of three components that work together to generate trading signals:
MACD Line: The 12-period EMA minus the 26-period EMA. When the faster EMA pulls away from the slower EMA, the MACD line moves further from zero, indicating strong momentum. When the two EMAs converge, the MACD line approaches zero, indicating weakening momentum.
Signal Line: A 9-period EMA of the MACD line itself. This smoothed version of the MACD line acts as a trigger for buy and sell signals. When the MACD line crosses above the signal line, it generates a bullish signal. When it crosses below, it generates a bearish signal.
Histogram: The visual difference between the MACD line and the signal line, plotted as bars above or below zero. The histogram provides an early warning system: when the bars start shrinking, it means the MACD and signal lines are converging and a crossover is approaching. The histogram was added by Thomas Aspray in 1986 to anticipate crossovers sooner.
Signal Line Crossovers
The signal line crossover is the most common MACD trading signal. A bullish crossover occurs when the MACD line crosses above the signal line, suggesting that short-term momentum has shifted upward and the price may continue to rise. A bearish crossover occurs when the MACD line crosses below the signal line, warning that downward momentum is building.
The strength of a crossover signal depends on its location. Crossovers that occur far below the zero line (deeply negative territory) are more powerful bullish signals because they represent a shift from strongly bearish to emerging bullish momentum. Similarly, crossovers far above zero are stronger bearish signals. Crossovers near the zero line in range-bound markets often produce whipsaws and should be treated with caution.
To reduce false signals, many traders wait for the histogram to confirm the crossover by printing two or three bars on the new side. Others combine MACD crossovers with price action confirmation such as a break of a trendline or support/resistance level.
Zero Line Crossover
When the MACD line crosses above zero, it means the 12-period EMA has crossed above the 26-period EMA, confirming that the intermediate-term trend has turned bullish. When the MACD line crosses below zero, the trend has turned bearish. The zero line crossover is a slower, more reliable signal than the signal line crossover.
Some traders use the zero line as a trend filter: only take bullish signal line crossovers when MACD is above zero, and only take bearish crossovers when MACD is below zero. This approach misses the earliest entries but significantly reduces false signals in choppy markets.
MACD Divergence
Divergence between MACD and price provides some of the highest-probability trade setups. Bullish divergence occurs when price makes a lower low but the MACD makes a higher low, indicating that selling momentum is weakening despite new price lows. This frequently occurs at the end of extended downtrends and can precede powerful reversals.
Bearish divergence occurs when price makes a higher high but the MACD makes a lower high. The histogram often reveals divergence earlier than the MACD line itself, as shrinking histogram bars during a price advance signal fading momentum before the MACD line turns over.
As with all divergence signals, use them as warnings rather than instant entry triggers. Wait for the MACD to actually confirm with a crossover before entering a trade. Divergence can persist for multiple bars before the reversal materializes.
Common Mistakes
Trading every crossover. In sideways markets, the MACD line and signal line weave back and forth, producing frequent crossovers that lead to whipsaw losses. Filter crossovers with trend analysis or only trade them when the histogram shows clear momentum.
Ignoring the histogram. Many traders only watch for crossovers and miss the valuable information the histogram provides. Shrinking histogram bars are an early warning that a crossover is approaching and can help you prepare entries or tighten stops.
Using MACD as a standalone system. MACD works best when combined with support and resistance levels, price action, or other indicators like RSI. A MACD bullish crossover at a major support level is far more reliable than a crossover in the middle of nowhere.
Expecting real-time precision. MACD is based on moving averages and is inherently a lagging indicator. It confirms trend changes after they begin, not before. Accept the lag as the cost of a reliable signal.
Recommended Settings
| Settings | Style | Best For |
|---|---|---|
| 12, 26, 9 (standard) | Balanced | Daily charts, swing trading, most assets |
| 8, 17, 9 | Fast | Day trading, 4-hour charts, quicker entries |
| 19, 39, 9 | Slow | Weekly charts, position trading, fewer signals |
| 5, 35, 5 | Wide | Momentum bursts, breakout confirmation |
Frequently Asked Questions
Related Indicators
Related Tools & Guides
Part of our Technical Analysis Guide