Here’s the MACD indicator explained in a sentence: it tracks the gap between two moving averages, and that gap tells you which way momentum is pointing and how hard it’s pushing. MACD is short for Moving Average Convergence Divergence. Open almost any Indian charting tool, a broker app or TradingView, and you’ll find it near the top of the indicator list. In this guide we go through how MACD is put together, how to read each piece, the main signals, and where it tends to let you down on Nifty stocks.
In this article
- MACD Indicator Explained: The Three Parts
- How MACD Is Calculated (Step by Step)
- How to Read the MACD: Four Main Signals
- Using MACD With the Trend
- MACD vs RSI: What Each Tells You
- Where MACD Fails
- How to Add MACD on Common Platforms
- A Simple MACD Checklist
- Learn More
- Reading MACD in a Full Trend Cycle (Illustrative)
- Frequently Asked Questions
- Key Takeaways
MACD Indicator Explained: The Three Parts
Add MACD to a chart and you’ll normally get two lines and a histogram sitting underneath the price.
1. The MACD line
This is the 12-period exponential moving average (EMA) minus the 26-period EMA. An EMA leans more heavily on recent prices than a simple average does. When the quicker 12-EMA is above the slower 26-EMA, the MACD line is positive. When it drops below, the line goes negative.
2. The signal line
The signal line is a 9-period EMA of the MACD line itself. Because it smooths the MACD line, it turns more slowly. A lot of traders simply wait for the MACD line to cross it.
3. The histogram
The histogram plots the MACD line minus the signal line. Bars above zero tell you the MACD line is above the signal line. Bars getting taller mean momentum is building. Bars getting shorter mean it’s running out of steam, even while price is still going up.
The default settings: 12, 26, 9
Gerald Appel came up with MACD in the 1970s, according to Investopedia, and 12, 26 and 9 are still the defaults on most charting platforms. On a daily chart that works out to roughly two and a half weeks, five weeks and two weeks of trading. Intraday traders sometimes tweak them. Our post on MACD indicator best settings for intraday lines up the common alternatives.
How MACD Is Calculated (Step by Step)
- Work out the 12-period EMA of closing prices.
- Work out the 26-period EMA of closing prices.
- Subtract: MACD line = 12-EMA − 26-EMA.
- Take a 9-period EMA of the MACD line. That’s your signal line.
- Subtract again: Histogram = MACD line − signal line.
Illustrative example (made-up numbers): Say a stock’s 12-day EMA is ₹1,520 and its 26-day EMA is ₹1,500. The MACD line comes to +20. If the signal line sits at +15, the histogram shows +5. Momentum is positive, and the MACD line is pulling away from its own average.
One thing people miss: MACD values are in price units, not percentages. A ₹3,000 stock will throw up far bigger MACD readings than a ₹300 stock. So don’t compare raw MACD numbers across different stocks; it tells you nothing.
How to Read the MACD: Four Main Signals
1. Signal line crossover
A bullish crossover is when the MACD line moves above the signal line. A bearish crossover is when it slips below. On the histogram, it’s the point where bars flip from negative to positive, or the other way.
Crossovers are the signal everyone watches, and also the noisiest. In a sideways market the two lines keep criss-crossing, and you get a stream of false signals.
2. Zero line crossover
When the MACD line crosses above zero, it means the 12-EMA has moved above the 26-EMA, which confirms short-term momentum has turned positive. A cross below zero says the opposite. Zero-line crosses show up later than signal-line crosses, but as trend confirmation they’re usually more dependable.
3. Divergence
Divergence is when price and MACD don’t agree.
- Bearish divergence: Price posts a higher high, but MACD posts a lower high. The upward push is getting weaker.
- Bullish divergence: Price posts a lower low, but MACD posts a higher low. Selling pressure is letting up.
Treat divergence as a warning, not a timing tool. A trend can carry on for weeks after a divergence shows up. Wait for price to confirm it, say by breaking a trendline or a recent swing level. RSI works the same way; our guide on how to read RSI divergence goes into it.
4. Histogram shifts
Keep an eye on the histogram’s slope. Price rising while the bars shrink? Momentum is fading. Bars growing again after a pullback? The trend may be picking back up. Some traders treat the first shorter bar as an early nudge to tighten their stop.
Using MACD With the Trend
MACD does its best work when you trade it in the direction of the bigger trend. A simple way to set that up:
- Use the weekly chart or the 200-day moving average to find the main trend.
- In an uptrend, act only on bullish MACD crossovers on the daily chart, ideally ones that happen near or above the zero line.
- In a downtrend, be wary of bullish crossovers below zero. More often than not they’re just short bounces.
Our swing trading strategies for beginners guide shows where a trend filter like this slots into a complete trade plan.
MACD vs RSI: What Each Tells You
| Feature | MACD | RSI |
|---|---|---|
| Type | Trend-following momentum | Momentum oscillator |
| Range | Unbounded, in price units | 0 to 100 |
| Best for | Trend direction and shifts in momentum | Overbought and oversold readings, divergence |
| Weakness | Lags; whipsaws in ranges | Can stay overbought in strong trends |
Plenty of traders use both. MACD confirms the trend, and RSI helps time the entry within it. If you’re new to RSI, start with how to read RSI on Nifty stocks.
Where MACD Fails
Sideways markets
When a stock is stuck in a tight range, the 12 and 26 EMAs bunch up together. MACD hangs around zero and keeps crossing its signal line. Every crossover looks like a trade, and most go nowhere. If the price chart is a flat range, we’d give MACD signals much less weight.
Lag
MACD comes from moving averages, and moving averages come from past prices. So it will always react after price has already moved. In a sharp reversal, like a gap-down after weak results, MACD might flag it only when most of the move is done.
Gaps and news
Indian stocks gap all the time on results, block deals or policy news. No indicator can see these coming. Check the corporate calendar, and keep position sizes sensible around results days.
Comparing across stocks
Since MACD is measured in rupees, a reading of +25 means one thing for a ₹250 stock and something quite different for a ₹2,500 stock. Some platforms offer a percentage version (usually called PPO) if you want to compare across stocks.
How to Add MACD on Common Platforms
On most broker charting tools and on TradingView, open the indicators menu and type “MACD”. The default inputs are usually 12, 26 and 9 on closing prices. You can change the colours of the lines and histogram however you like. While you’re learning, though, stick with the defaults so your readings match what most traders and tutorials are looking at.
A Simple MACD Checklist
- Find the main trend on a higher timeframe.
- Look for MACD signals only in that direction.
- In uptrends, favour bullish crossovers near or above zero; in downtrends, bearish ones near or below zero.
- Check the histogram to see whether momentum is building or fading.
- Treat divergence as a warning and wait for price to confirm.
- Back it up with price structure: support, resistance or a breakout.
- Place your stop loss off the chart, not off the indicator, and size the trade from your rupee risk.
Learn More
For a free, detailed lesson on MACD and other indicators, the Zerodha Varsity technical analysis module is a good place to go. For trading risk disclosures and investor education, check the SEBI investor website.
MACD is just one tool in the kit. Our pillar complete guide to technical analysis for Indian stocks shows how indicators, price structure and volume fit together.
Reading MACD in a Full Trend Cycle (Illustrative)
This is how MACD usually behaves over one full swing, described without any real prices.
- Base. The stock drifts sideways for several weeks. MACD sits on the zero line and the histogram bars are tiny.
- Early move. Price breaks out of the range. The MACD line crosses above the signal line and the histogram turns positive.
- Confirmation. A few sessions on, the MACD line crosses above zero. Now the moving averages back up the trend.
- Peak momentum. The histogram prints its tallest bars just as price is climbing fastest.
- Fading. Price keeps inching up, but the histogram shrinks. A bearish divergence may start to take shape.
- Turn. The MACD line drops below the signal line. A careful trader tightens the stop or books part of the profit.
See that no signal is used on its own. Each stage adds a different bit of information, and price action has the final say on the trade.
Frequently Asked Questions
Which timeframe is best for MACD?
The default settings were built for daily charts, and that’s where most swing traders use them. Intraday traders run MACD on 5 to 15 minute charts, where signals come faster but with a lot more noise.
Is a MACD crossover a buy signal?
Not by itself. A crossover only tells you short-term momentum has shifted. Use it as one input along with the trend, price structure and your risk plan.
Can MACD be used on Nifty and Bank Nifty?
Yes. Index charts tend to be smoother than single stocks, so MACD trend signals are often cleaner. Gaps from global cues still hit them, though.
Key Takeaways
- MACD is the 12-EMA minus the 26-EMA, with a 9-EMA signal line and a histogram that shows the gap between them.
- The main signals are signal-line crossovers, zero-line crossovers, divergence and histogram shifts.
- It works well with the trend and badly in sideways markets.
- It lags price and can’t see gaps coming, so pair it with price structure and risk rules.
This article is for education only and is not investment advice. Trading involves risk of loss. Please consult a SEBI-registered adviser before making trading decisions.

Leave a Reply
Join the conversation
Commenting is open to registered readers. Sign up with just your email — no password needed, and it takes under a minute.
Sign up to comment Log in