What Is the MACD Indicator?
- MACD above signal line: bullish momentum is strengthening
- MACD below signal line: bearish momentum is strengthening
- MACD above zero: short-term EMA is above the longer-term EMA
- MACD below zero: short-term EMA is below the longer-term EMA
- Growing histogram: distance between MACD and signal line is expanding
- Shrinking histogram: momentum difference is contracting
- Default settings: 12, 26, 9
The MACD is one of the most popular technical indicators because it attempts to combine two ideas traders care about enormously: trend and momentum.
That makes it more informative than simply looking at whether price is above or below a single moving average.
But there is a catch.
MACD is built entirely from historical price data. It therefore lags price, and blindly buying every bullish crossover or selling every bearish crossover can generate a huge number of bad trades—particularly when the market moves sideways.
The real value of MACD comes from understanding what its individual components are telling you and then combining them with price structure, trend strength, volume and risk management.
Who Invented MACD?
The Moving Average Convergence Divergence indicator was developed by Gerald Appel in the 1970s.
Its purpose was to compare a faster moving average against a slower moving average so traders could visualize changes in trend and momentum.
Because MACD incorporates several measurements into one indicator, it can provide more context than looking at a single moving average by itself.
If moving averages are new to you, start with my guide: EMA vs SMA: Which Moving Average Is Better?
The MACD Formula
The standard MACD uses a 12-period EMA and a 26-period EMA.
Signal Line = 9-period EMA of the MACD Line
Histogram = MACD Line − Signal Line
When the faster 12-period EMA moves above the slower 26-period EMA, the MACD line becomes positive.
When the 12-period EMA falls below the 26-period EMA, MACD becomes negative.
That means MACD can be thought of as a visualization of the distance between two moving averages.
When that distance expands, momentum is increasing. When it contracts, momentum between the two averages is weakening.
The 3 Parts of the MACD Indicator
MACD contains three primary components:
- MACD Line
- Signal Line
- MACD Histogram
1. MACD Line
This is the difference between the fast EMA and slow EMA.
The farther the MACD line moves away from zero, the larger the separation between those moving averages.
2. Signal Line
The signal line is a 9-period EMA of the MACD line itself.
Because it smooths the MACD line, traders can use the interaction between the two lines to identify changes in momentum.
3. MACD Histogram
The histogram measures the distance between the MACD line and signal line.
This makes the histogram particularly useful because traders can visually see momentum accelerating or decelerating.
How to Read the MACD Zero Line
The zero line is one of the simplest but most useful MACD signals.
- MACD above zero: 12 EMA is above the 26 EMA.
- MACD below zero: 12 EMA is below the 26 EMA.
In plain English, MACD above zero generally indicates the shorter-term trend is stronger than the longer-term trend.
MACD below zero indicates the opposite.
This is why I view the zero line primarily as a trend context signal rather than an automatic trading trigger.
Why Repeated Zero-Line Crosses Matter
If MACD repeatedly moves above and below zero over a short period, the market may be moving sideways.
That is important because MACD is a trend-following indicator.
This is one reason I like combining MACD with an independent trend-strength measurement such as the ADX indicator .
MACD Crossovers: Bullish and Bearish Signals
Signal-line crossovers are probably the most commonly used MACD signal.
Bullish MACD Crossover
A bullish crossover occurs when the MACD line crosses above the signal line.
This indicates that short-term momentum is strengthening relative to its recent average.
Bearish MACD Crossover
A bearish crossover occurs when the MACD line crosses below the signal line.
This indicates weakening short-term momentum.
But this is where traders often make a mistake:
A crossover is not inherently a buy or sell command.
A bullish crossover occurring within an established uptrend has very different implications from a bullish crossover occurring in the middle of a directionless sideways range.
Why MACD Crossovers Fail
Suppose a stock trades sideways between $95 and $105 for several months.
The 12 EMA and 26 EMA repeatedly cross each other as price moves back and forth inside the range.
MACD might therefore produce:
- Bullish crossover
- Bearish crossover
- Bullish crossover
- Bearish crossover
None represents a durable trend.
A trader mechanically following every signal can slowly get chopped to pieces.
This behavior is known as whipsaw.
It is not necessarily a failure of MACD. It means you're using a trend-following indicator in a market that isn't trending.
That's why identifying the market environment first is often more important than identifying the crossover.
How to Read the MACD Histogram
The MACD histogram is one of my favorite components because it makes momentum changes extremely easy to visualize.
Remember:
When the histogram gets larger, the distance between MACD and the signal line is increasing.
That indicates momentum is accelerating.
When the histogram begins shrinking, the two lines are converging.
Momentum is decelerating.
Shrinking Histogram ≠ Immediate Reversal
This distinction matters.
If a positive histogram becomes smaller, it does not necessarily mean price must fall.
It means bullish momentum is slowing.
Price can continue higher at a slower rate, consolidate sideways or eventually reverse.
Similarly, a shrinking negative histogram means bearish momentum is losing strength—not that a rally is guaranteed.
I generally find this interpretation more useful than treating every histogram change as a mechanical trade.
MACD Bullish and Bearish Divergence
Divergence occurs when the behavior of price and MACD stop confirming one another.
This can warn that momentum underneath a trend is changing.
Bullish MACD Divergence
Bullish divergence occurs when:
- Price makes a lower low, while
- MACD or its histogram makes a higher low.
Price continues weakening, but downside momentum is no longer becoming more extreme.
That can indicate selling pressure is losing strength.
Bearish MACD Divergence
Bearish divergence occurs when:
- Price makes a higher high, while
- MACD makes a lower high.
Price continues rising, but momentum is failing to confirm that strength.
This can warn that the trend is becoming vulnerable.
That is particularly important with bearish divergence. I would not short a strong stock simply because MACD has made a lower high.
Short selling introduces substantially different risk than owning shares. Read How to Short Stocks before interpreting bearish MACD divergence as an automatic short signal.
Real Example: Bullish MACD Divergence
The chart below demonstrates bullish divergence.
Price made a lower low, but momentum represented by the MACD histogram failed to make a corresponding lower low.
In other words, price looked weaker while the momentum underneath the decline was actually improving.
The eventual reversal demonstrates why divergence can be useful.
But the correct takeaway is not that divergence always predicts a bottom. Instead, divergence gives you another independent clue that the existing trend may be losing momentum.
Best MACD Settings: Is 12, 26, 9 Always Best?
The standard MACD configuration is:
12, 26, 9
That is an excellent starting point, but it is not mathematically ordained to be the best setting for every market and timeframe.
| Settings | Behavior | Tradeoff |
|---|---|---|
| Faster MACD | Responds quickly to price | More signals and more whipsaws |
| 12 / 26 / 9 | Standard balanced configuration | Good baseline for testing |
| Slower MACD | Filters more short-term noise | Signals arrive later |
The same speed-versus-noise tradeoff appears with almost every moving-average indicator.
Faster settings catch changes sooner but generate more false signals. Slower settings produce cleaner signals but react later.
That is why the correct answer to "What is the best MACD setting?" is: test it.
MACD for Day Trading vs Swing Trading
Day Trading
On intraday charts, MACD responds to much shorter price cycles.
That can create a large number of crossovers, particularly during low-volatility or sideways periods.
If using MACD intraday, filtering signals with trend strength and price structure becomes particularly important.
Swing Trading
MACD tends to be easier to interpret on larger timeframes because much of the intraday noise disappears.
A daily-chart bullish crossover occurring within an established uptrend can be much more meaningful than a random crossover on a 1-minute chart.
That does not mean daily MACD is automatically profitable. It means the signal contains less microstructure noise.
How I Would Build a MACD Trading Strategy
Rather than using:
"MACD crosses up → buy"
I would build a multi-stage process.
- Determine the trend. Is price making higher highs/higher lows or lower highs/lower lows?
- Check moving-average structure. Is the faster trend aligned with the longer-term trend?
- Measure trend strength. Use an independent indicator such as ADX.
- Evaluate MACD. Is it above zero? Is there a bullish crossover? Is the histogram expanding?
- Check price structure. Is price breaking resistance, bouncing from support or moving randomly?
- Check participation. Does trading volume support the move?
- Define risk. Know where the setup becomes invalid before entering.
This creates a cluster of independent signals rather than relying entirely on MACD.
That's much closer to how I believe technical analysis should actually be used.
MACD + RSI
MACD and RSI can work well together because the two indicators present momentum differently.
For example, suppose:
- MACD makes a bullish crossover.
- MACD is above zero.
- RSI moves above 50.
- Price breaks resistance.
Those signals collectively provide more information than the MACD crossover alone.
However, be careful not to stack multiple momentum indicators and assume that five versions of the same information constitute five independent confirmations.
MACD + ADX
I particularly like the conceptual combination of MACD and ADX because they answer different questions.
- MACD: What direction is trend/momentum shifting?
- ADX: Is there actually a strong trend?
This directly addresses MACD's biggest weakness: whipsaws in sideways markets.
A bullish MACD crossover in a genuinely strong trend is much more interesting than one occurring while trend strength is extremely weak.
Read: ADX Indicator Explained .
MACD + EMA Cloud
Another useful combination is MACD with the EMA Cloud .
The EMA Cloud provides an easy visual representation of the underlying trend, while MACD helps show whether momentum within that trend is strengthening or weakening.
For example, a bullish MACD crossover occurring while price remains firmly above a bullish EMA Cloud can be substantially more interesting than the same crossover occurring below a bearish cloud.
MACD vs RSI: Which Is Better?
Neither is universally better.
| MACD | RSI |
|---|---|
| Trend + momentum | Momentum oscillator |
| Uses moving averages | Compares recent gains vs losses |
| No fixed upper/lower range | Ranges from 0 to 100 |
| Useful for crossovers and trend context | Useful for momentum regimes and extremes |
| Can show divergence | Can show divergence |
Instead of asking which indicator wins, ask which one answers the question your trading system needs answered.
The Biggest MACD Trading Mistakes
- Buying every bullish crossover. Sideways markets generate constant whipsaws.
- Selling every bearish crossover. A brief momentum slowdown does not necessarily end the larger trend.
- Ignoring the zero line. The same crossover has different context above and below zero.
- Confusing histogram contraction with reversal. Momentum slowing is not the same as price reversing.
- Treating divergence as guaranteed. Divergence can persist much longer than expected.
- Using MACD alone. It is still based entirely on historical price.
- Over-optimizing settings. A MACD configuration that perfectly fits one historical chart may fail on future data.
Backtest MACD Instead of Guessing
This is where MACD becomes particularly interesting.
Because its signals are mathematically defined, they can be systematically tested.
For example, instead of saying:
"MACD crossovers look profitable."
Test specific rules:
- Buy when MACD crosses above signal line.
- Only buy when MACD is above zero.
- Only buy when price is above the 200-day moving average.
- Add an ADX trend-strength filter.
- Add volume confirmation.
- Compare results against simply buying and holding.
Then test the rules across multiple stocks and different market environments.
That is far more meaningful than finding three historical charts where MACD worked perfectly.
TrendSpider — Market Research, Scanning & Backtesting allows you to test technical-analysis rules rather than manually scrolling through charts looking for successful examples.
You can also read my complete tutorial: How to Create a Winning Stock Trading System .
For those interested in building trading systems programmatically: Hands-On Trading With Python covers quantitative strategy development and backtesting.
Disclosure: Some links above are affiliate links. I may receive a commission at no additional cost to you.MACD Frequently Asked Questions
What does MACD stand for?
MACD stands for Moving Average Convergence Divergence. It measures the relationship between a faster exponential moving average and a slower exponential moving average.
What is the standard MACD setting?
The traditional setting is 12, 26, 9: a 12-period EMA, 26-period EMA and 9-period signal line.
What is a bullish MACD signal?
A MACD line crossing above its signal line indicates strengthening bullish momentum. The signal generally has more useful context when it agrees with the broader price trend.
What does MACD crossing above zero mean?
It means the 12-period EMA has moved above the 26-period EMA, indicating shorter-term price momentum is stronger than the longer-term average.
What does a shrinking MACD histogram mean?
It means the distance between the MACD line and signal line is decreasing. Momentum is decelerating, but that does not necessarily mean price will reverse.
Is MACD a leading or lagging indicator?
MACD is primarily a lagging trend-following indicator because it is calculated from moving averages of historical prices. Divergence and histogram changes can sometimes warn of changing momentum earlier, but MACD should not be treated as a reliable predictor of future price.
Is MACD better than RSI?
Neither is inherently better. MACD is useful for trend and momentum relationships, while RSI is particularly useful for measuring momentum regimes, extremes and divergence. They answer somewhat different questions.
Does MACD work for day trading?
It can be used intraday, but shorter timeframes contain considerably more noise. MACD crossovers can therefore generate frequent false signals when price is moving sideways.
Can MACD predict stock reversals?
No indicator reliably predicts reversals. MACD divergence, histogram contraction and crossovers can warn that momentum is changing, but price confirmation and risk management remain essential.
Conclusion: MACD Is Best Used as a Trend and Momentum Tool
MACD is popular for good reason.
It condenses several useful pieces of information into one indicator:
- Short-term versus long-term trend
- Momentum direction
- Momentum acceleration and deceleration
- Signal-line crossovers
- Zero-line positioning
- Bullish and bearish divergence
But MACD does not eliminate the fundamental limitation of technical indicators: it is derived from price that has already occurred.
I therefore view MACD primarily as a tool for identifying and riding an existing trend, not as a magical mechanism for forecasting exactly where price will go next.
Its weakest environment is a directionless market where the moving averages repeatedly cross and generate false signals.
Its strongest use is within a defined trading framework where price structure, trend strength, volume and risk management all agree with what MACD is showing.
Most importantly, don't assume that MACD works because a few historical charts look impressive. Turn the rules into a system and test them.