MACD Indicator Explained: Settings, Signals & Strategy
MACD turns two moving averages into a momentum read. Learn the 12-26-9 formula, crossovers, zero-line context, divergence and a worked swing trade with entry, stop and target.
MACD (Moving Average Convergence Divergence) is a momentum indicator that subtracts a 26-period exponential moving average from a 12-period one and compares the result with a 9-period average of itself. Crossovers, the zero line, the histogram and divergences from price show whether momentum is building or fading.
This article is educational only, not financial advice. Indicators lag and fail, past performance does not guarantee future results, and every trade needs a stop.
Key takeaways
- MACD line = 12-period EMA minus 26-period EMA; signal line = 9-period EMA of the MACD line; histogram = MACD line minus signal line.
- A bullish crossover (MACD above signal) is more reliable when it happens in an uptrend, near or above the zero line, and at a price support level.
- Divergence (price makes a new extreme but MACD does not) is an early warning that momentum is fading, not a trigger by itself.
- MACD lags and whipsaws in sideways markets, so pair it with price structure, volume and a stop.
- It works best on daily charts for swing trading, using the default 12-26-9 settings as a baseline.
What is the MACD indicator?
MACD is a trend-following momentum indicator developed by Gerald Appel in the late 1970s. It converts two exponential moving averages (EMAs, which weight recent prices more heavily) into a single oscillator that moves above and below a zero line.
There are three parts:
- MACD line: 12-period EMA minus 26-period EMA.
- Signal line: 9-period EMA of the MACD line, a smoother version of it.
- Histogram: MACD line minus signal line, drawn as bars.
When the 12 EMA is above the 26 EMA, the MACD line is positive, meaning short-term momentum is stronger than the longer-term trend. For example, if the 12 EMA is $52.40 and the 26 EMA is $50.80, the MACD line reads +1.60. When the faster average falls below the slower one, it turns negative.
How do MACD crossovers work?
A crossover occurs when the MACD line crosses the signal line. A cross above is bullish and a cross below is bearish, and the histogram flips sign at the same moment.
- Bullish crossover: momentum is accelerating up relative to its recent average. It is more useful after a pullback in an uptrend than in the middle of a decline.
- Bearish crossover: momentum is fading. In a healthy uptrend it often marks only a pause; at resistance after a long run it carries more weight.
Because MACD is built from averages of past prices, the cross arrives after the turn has started. That is the cost of its smoothing.
What does the MACD zero line tell you?
The zero line shows whether the 12 EMA is above or below the 26 EMA. Above zero, short-term trend is up; below zero, it is down.
| Crossover | Zero-line position | Reading |
|---|---|---|
| Bullish | Just below or above zero | Higher quality: shallow pullback in an uptrend |
| Bullish | Far below zero | Lower quality: counter-trend bounce in a downtrend |
| Bearish | Far above zero | Moderate: could be a stretched move cooling |
| Bearish | Below zero | Trend-following; confirms weakness |
Treat the zero line as the line between offense and defense: bullish crossovers above or near it align with the trend, while those far below it fight the trend.
What does the MACD histogram show?
The histogram shows the gap between the MACD line and the signal line. Taller bars mean the lines are separating and momentum is strengthening; shrinking bars mean momentum is cooling, often before the lines cross.
That makes the histogram an early warning. Bars that peak and begin to shrink while price is still rising suggest the move is losing force. For a dedicated treatment, see MACD Histogram Strategy.
What is MACD divergence?
Divergence occurs when price and MACD disagree about the extreme.
- Bullish divergence: price makes a lower low but MACD makes a higher low. Selling pressure is weakening.
- Bearish divergence: price makes a higher high but MACD makes a lower high. Buying pressure is weakening.
For example, a stock falls from $45 to a first low of $38, bounces to $42, then drops to $36. If MACD bottomed at -1.4 on the first low and only -0.8 on the second, price went lower while momentum did not. That can precede a bounce, especially at a known support level.
Divergence can persist for a long time while price keeps trending, so wait for price to confirm, such as a close above the recent swing high. The topic is covered further in Bullish Divergence Explained and Bearish Divergence Explained.
How do you trade a MACD signal? A worked example
Pair the MACD cross with price structure so that the stop has a logical location.
Hypothetical numbers: a stock rallied from $38 to $50 and has pulled back to $44.50 on lighter volume, touching a rising 50-day average near $44.20 with a swing low of $44.10. During the pullback, MACD fell to -0.35 and the histogram turned negative.
- Signal: two sessions later the MACD line crosses above the signal line, the histogram turns positive, and the stock closes at $45.60, back above its 10-day average.
- Entry: $45.70, just above that day's high.
- Stop: $43.90, below the $44.10 swing low and the 50-day average. Risk is $1.80 per share.
- Target: $50.00, the prior high. Reward is $4.30, or about 2.4:1.
- Position size: risking 1% of a $30,000 account ($300) allows 166 shares ($300 / $1.80).
The MACD cross alone is not what makes this trade. It is the pullback to support, the rising trend, and the defined stop. Without them, the same cross is just a coin flip. For the arithmetic, see Risk-Reward Ratio in Swing Trading, and for stop options, Where to Place a Stop Loss in Swing Trading.
How do you combine MACD with other tools?
Use MACD for momentum and other tools for location and participation.
- Price structure. Support, resistance and trendlines tell you where a signal matters. Support and resistance levels are the first filter.
- Moving averages. A pullback to a rising 50-day average, as in the example, is covered in 50-Day Moving Average Pullback Strategy.
- RSI. The relative strength index measures the speed of price moves on a 0-100 scale. It complements MACD rather than duplicating it; for a different RSI use, see 2-Period RSI Strategy.
- Volume. A bullish cross on volume 1.3x or more the 20-day average is more convincing than one on thin volume.
- Trend filter. Only take bullish crosses when price is above a rising longer-term average. The EMA Ribbon is one way to define that.
What are the limits of MACD?
MACD lags, whipsaws in ranges and cannot judge value.
- It lags. It is made of moving averages, so signals arrive after the turn begins. In fast markets the best entry may be gone.
- It whipsaws. When a stock chops sideways, the lines cross back and forth, creating a string of small losses. Skip crossovers when the histogram stays near zero and price is flat.
- It is not scale-free. MACD values depend on price, so a +1.60 reading means different things on a $20 stock and a $400 stock. Compare a stock's own history, not different tickers' absolute numbers.
- Settings are conventions. 12-26-9 is the default; shorter settings react faster and give more false signals, longer settings the reverse. Changing the numbers does not create an edge by itself.
Common mistakes
- Trading every crossover. Filter by trend and location.
- Ignoring the zero line. A cross far below zero in a downtrend is a weak long signal.
- Acting on divergence alone. Wait for price to confirm.
- Comparing absolute MACD values across stocks. Use the same stock's history.
- No stop. The indicator does not define risk; price structure does.
The bottom line
MACD is a simple, widely used way to see whether momentum is building or fading. Read the crossover with the zero line and histogram, watch for divergence at meaningful levels, and combine it with price structure, volume and a stop. It is a context tool, not a system.
StockSetups scans roughly 12,300 US stocks and ETFs after each close and sorts long chart-pattern setups into four lanes (Setting up, Breaking out, Broke out, Retesting breakout). Paid plans add MACD, RSI, ADX and relative strength alongside trade plans and a 0-100 conviction score, so you can check momentum on candidates the scanner has already found.
Frequently asked questions
What does MACD stand for?
Moving Average Convergence Divergence. It measures the relationship between a 12-period and a 26-period exponential moving average, smoothed with a 9-period signal line.
What are the default MACD settings?
12, 26 and 9: the fast EMA, the slow EMA and the signal-line EMA. Shorter settings react faster but whipsaw more; longer settings are smoother but later.
What is the difference between the MACD line and the histogram?
The MACD line is the 12 EMA minus the 26 EMA. The histogram is the MACD line minus the signal line, so it shows how far apart those two lines are and often turns before they cross.
Is a MACD crossover above or below zero better?
For bullish crossovers, ones near or above zero in an uptrend are generally higher quality than ones far below zero, which usually happen inside a downtrend.
Can MACD be used on its own?
It is better as a confirmation tool. MACD lags and whipsaws in sideways markets, so traders pair it with support and resistance, volume and a defined stop.
Sources & further reading
- Gerald Appel, Technical Analysis: Power Tools for Active Investors (2005)
Try it free
Produced with AI assistance and published under the StockSetups editorial guidelines.
Get daily signals & real-time alerts.
StockSetups scans ~12,300 US stocks & ETFs after every close and sorts every long setup into four ranked lanes — each with a trade plan — plus an always-on engine firing 35+ real-time intraday alerts. Free for 7 days, no credit card.
Start free — 7-day trial, no card →Free daily signals by email. Top 3 setups per lane after every close. No account needed.
Unsubscribe anytime · Privacy