MACD (Moving Average Convergence Divergence) is the most cited trend-following indicator after the moving average itself. Created by Gerald Appel in 1979, it combines two EMAs and a signal line into a single oscillator that captures both trend direction and momentum. Used correctly, it's a reliable mid-trend confirmer. Used incorrectly, it's a lagging indicator that signals every reversal too late.
The three components
MACD has three plotted elements:
- MACD line = 12-period EMA − 26-period EMA. Captures short-term vs medium-term trend gap.
- Signal line = 9-period EMA of the MACD line. The smoothed version of MACD.
- Histogram = MACD line − Signal line. Bars rising above zero = bullish momentum strengthening; bars falling below zero = bearish momentum strengthening.
Default settings (12, 26, 9) are convention. They work well on daily charts. For intraday: try (5, 13, 5) for faster signals. For weekly position trading: stick with default.
The four standard signals
1. Signal line crossover
MACD line crosses above signal line = bullish. MACD crosses below = bearish. The basic textbook signal.
Problem: Standalone signal-line crossovers have ~50% win rate on Indian large-caps. No edge alone. Always combine with trend filter (price above 200-SMA = take only long crossovers).
2. Zero-line crossover
MACD line crosses above zero = 12-EMA crossed above 26-EMA = stock entered uptrend phase. Lagging but reliable trend-confirmation signal.
Use case: Position trading. Buy when MACD crosses above zero on a stock you've fundamentally researched. Sell when it crosses below.
3. Histogram peak / trough
Histogram peaks before price peaks. When histogram bars start shrinking (still positive but smaller), momentum is fading even though MACD is still bullish. Early exit signal for profit-taking.
Worked example: HDFC Bank Q1 2024. MACD line stayed above signal throughout the rally, but histogram peaked in March 2024 and shrank through April. Price topped in mid-April. Traders watching histogram exited 3-4 sessions before the eventual reversal.
4. Divergence (highest-edge setup)
Like RSI divergence — price makes higher high, MACD makes lower high (bearish divergence) or vice versa (bullish). Combined with at-resistance / at-support context, this is the highest-win-rate MACD setup. Used by quant funds for entry timing.
The trend-filter overlay (the rule that actually creates edge)
Standalone MACD signals on Indian large-caps backtest at ~50% win rate. Adding a single trend filter — only take signals when price is above 200-SMA for longs / below for shorts — raises win rate to ~58-62% with marginally improved R:R.
The rule:
- Uptrend (price > 200-SMA): Buy on MACD bullish signal line crossover. Ignore bearish crossovers (counter-trend, low edge).
- Downtrend (price < 200-SMA): Sell on MACD bearish signal line crossover. Ignore bullish crossovers (dead-cat bounce risk).
- Sideways (price near 200-SMA, ADX < 20): Skip MACD signals entirely. Range-bound markets generate whipsaws.
The three setups that work in Indian markets
Setup 1: Trend continuation (high frequency, mid R:R)
- Stock is in uptrend (price > 200-SMA, rising)
- Pullback to 50-SMA
- MACD line approaches signal line from above (or crosses below briefly during the pullback)
- MACD bullish crossover on bounce
- Entry: Above the day's high after crossover. Stop: Below recent swing low. Target: Prior swing high or 2× initial risk.
Setup 2: Bullish divergence (low frequency, high R:R)
- Stock making lower lows in a corrective phase
- MACD making higher lows (divergence)
- Bullish signal line crossover triggers
- Entry: Day after crossover. Stop: Below the recent swing low. Target: Move to 200-SMA or 3× risk, whichever first.
Setup 3: Zero-line trend trade (positional, lowest frequency)
- Strong fundamentals on the stock (use fundamental scorecard)
- Daily MACD crosses above zero line
- Price above 200-SMA + above 50-SMA
- Entry: At the close of zero-line crossover day. Stop: 8-10% below entry (wider stop, multi-month holding period). Target: Trail stop with 20-SMA. Exit on MACD bearish zero-line crossover.
Common mistakes
- Trading every MACD crossover. 100+ daily crossovers per year on Nifty 50 stocks = whipsaw machine without trend filter.
- Using MACD alone for entry timing in trending markets. MACD lags. Use price action (breakout, pullback) for entry; MACD for confirmation.
- Treating zero-line crossovers as immediate buys. Zero-line crossover often happens AFTER 15-25% of the trend move. Late-comer signal.
- Ignoring divergence. Divergence is the most reliable MACD signal. Many traders never learn to spot it.
- Using MACD on volatile intraday charts. 1-minute and 5-minute MACD generates 80% false signals. Use 15m / 30m / hourly for intraday.
MACD vs RSI — when to use which
Both are momentum oscillators with different strengths:
- RSI: Better for range-bound markets, mean-reversion entries (oversold bounces, overbought reversals).
- MACD: Better for trending markets, trend-following entries and exits.
Most professional traders use both. RSI for range filter (avoid trades when RSI signals don't agree), MACD for trend confirmation. Stack with volume (1.5× avg on signal candle) and you have a 3-filter framework that beats single-indicator strategies by ~10-15% on win rate.
Use the Risk/Reward calculator to size your stop and target before entering. Use the Position Sizing calculator to set position size based on 1-2% risk per trade.