The Moving Average Convergence Divergence (MACD) indicator, created by Gerald Appel, is one of the most popular tools in technical analysis. It combines trend-following and momentum in a single panel below the price chart.
Used alone, MACD produces many false signals in sideways markets. Used with price structure and a trend filter, it is a genuinely useful tool.
How MACD is built
MACD has three parts:
- MACD line = 12-period EMA − 26-period EMA of closing prices.
- Signal line = 9-period EMA of the MACD line.
- Histogram = MACD line − signal line.
The default settings (12, 26, 9) were designed decades ago for daily charts, but they remain the standard on most platforms.
What each part tells you
- MACD above zero: the 12 EMA is above the 26 EMA — short-term momentum is bullish.
- MACD below zero: short-term momentum is bearish.
- MACD crossing above the signal line: momentum is turning up.
- MACD crossing below the signal line: momentum is turning down.
- Histogram growing: momentum is accelerating; shrinking: momentum is fading.
The classic MACD signals
Signal-line crossover
The most common signal: buy when MACD crosses above the signal line, sell when it crosses below. Simple — and noisy in ranges.
Zero-line crossover
MACD crossing above zero confirms that the short EMA has moved above the long EMA — a slower, trend-confirming signal.
Divergence
Price makes a new high while MACD makes a lower high (bearish divergence), or price makes a new low while MACD makes a higher low (bullish divergence). It warns that momentum is not confirming price. As with RSI, wait for price to confirm.
Why MACD alone whipsaws
Because MACD is built from moving averages, it lags. In sideways markets, the lines cross back and forth, generating one losing signal after another. That is not a flaw you can "fix" with different numbers — it is the nature of trend indicators in non-trending markets.
A better way: MACD with a trend filter
Add a simple rule that keeps you trading only with the bigger trend:
- Trend filter: close above the 200 EMA for longs.
- Entry: MACD crosses above the signal line.
- Exit: MACD crosses below the signal line, or a stop-loss is hit.
This removes many crossovers that happen against the main trend. You can run this exact strategy — and change any part of it — in our MACD crossover strategy backtest. Compare the results with and without the 200 EMA rule to see the difference a filter makes.
Using the histogram for timing
Many traders use the histogram to manage trades:
- A shrinking histogram in an open long position warns that momentum is fading — consider tightening the stop.
- A histogram that flips from negative to positive near a support level can add confidence to a pullback entry.
MACD settings: should you change them?
Some traders use faster settings (for example 8, 21, 5) for short-term trading. Faster settings react sooner but produce more false signals. Rather than hunting for perfect numbers, test a small number of sensible variations and keep the one that is robust across several markets.
MACD and risk management
MACD tells you about momentum, not about where you are wrong. Always:
- place your stop-loss beyond a meaningful price level,
- size your position from that stop (position size calculator),
- check that the reward to the next level is worth the risk (risk-reward calculator).
MACD vs RSI
| MACD | RSI | |
|---|---|---|
| Type | Trend + momentum | Momentum oscillator |
| Range | Unbounded | 0–100 |
| Best for | Trend changes, momentum shifts | Overbought/oversold, momentum strength |
| Weakness | Whipsaws in ranges | Stays extreme in strong trends |
Many traders use both: MACD for direction of momentum, RSI for strength. Read our RSI indicator guide.
Key takeaways
- MACD = 12 EMA − 26 EMA, with a 9 EMA signal line and a histogram.
- Crossovers show momentum shifts; the zero line shows trend bias.
- MACD whipsaws in ranges — add a trend filter such as the 200 EMA.
- Backtest your MACD rules and always trade with a defined stop.
Frequently asked questions
Is MACD good for intraday trading?
It can be, on 15-minute or hourly charts, but expect more whipsaws. A higher-timeframe trend filter helps a lot.
What are the best MACD settings?
The default 12, 26, 9 works well for most traders. Test any change on several markets before trusting it.
Can MACD predict reversals?
Divergence can warn that a trend is weakening, but it is not a reliable reversal signal on its own. Wait for price confirmation.
Can I export a MACD strategy to TradingView?
Yes — build it in our strategy builder and export it as Pine Script with BullishBrush Pro.
BullishBrush শুধুমাত্র শেয়ার বাজারের শিক্ষা দেয়। আমরা SEBI-রেজিস্টার্ড ইনভেস্টমেন্ট অ্যাডভাইজার বা রিসার্চ অ্যানালিস্ট নই এবং কোনো কেনা-বেচার পরামর্শ বা টিপস দিই না। শেয়ার বাজারে বিনিয়োগ বাজারের ঝুঁকির অধীন; বিনিয়োগের আগে সব নথি মনোযোগ দিয়ে পড়ুন। অতীতের ফলাফল ভবিষ্যতের নিশ্চয়তা নয়।