What you will learn in this lesson
- Understand that MACD is built from the relationship between two EMAs
- Learn the three parts of MACD - the MACD line, the signal line, and the histogram
- Understand what a bullish or bearish crossover between the MACD line and signal line means
- Recognize how the histogram visually represents the gap between the two lines
- Know how to add MACD to a TradingView chart and read its panel
If EMA and SMA are the alphabet of moving averages, MACD is one of the most popular sentences built from it - comparing two moving averages against each other to describe both trend and momentum in a single indicator. This lesson breaks down its three parts and the crossover concept traders watch most closely.
What Is MACD, Built From?
MACD stands for Moving Average Convergence Divergence. At its core, it’s built from two Exponential Moving Averages (EMAs) of different periods - commonly a faster 12-period EMA and a slower 26-period EMA. The MACD line is simply the difference between these two EMAs, plotted as its own line. When the faster EMA is above the slower one, the MACD line sits above zero; when the faster EMA is below the slower one, the MACD line sits below zero.
This is why Lesson 19’s EMA concept matters so directly here - MACD isn’t a separate idea from moving averages, it’s a specific way of comparing two of them.
The Three Parts of MACD
MACD is typically displayed with three components together, in its own panel below the price chart:
- MACD line - the difference between the fast and slow EMA
- Signal line - itself an EMA (commonly 9-period) of the MACD line, smoothing it further
- Histogram - bars showing the gap between the MACD line and the signal line
MACD Panel
│ MACD line ────╮
│ ╲
│ ╭── crossover ──╮ ╲___
│ Signal line ──────────────╯
0 ──┼─────────────────────────────────────────────
│ ▂▃▅ histogram bars shrink as lines converge
Bullish and Bearish Crossovers
The relationship many traders watch most closely is the crossover between the MACD line and the signal line:
- A bullish crossover describes the MACD line crossing above the signal line.
- A bearish crossover describes the MACD line crossing below the signal line.
The histogram visually mirrors this same relationship - it grows taller as the MACD line and signal line move further apart, and shrinks toward zero as they converge, often flipping sign right around the moment of an actual crossover.
As with every crossover discussed in this course, it’s worth being precise about what this means: a crossover describes a change that has already happened between two EMA-derived lines. Many traders watch it as one useful piece of momentum and trend information - not a guaranteed signal of what price does next.
Adding MACD on TradingView
- Click “Indicators,” search “MACD,” and select “Moving Average Convergence Divergence.”
- It opens in a new panel below the price chart, showing the MACD line, signal line, and histogram together.
- Settings allow adjusting the fast EMA period, slow EMA period, and signal line period (12, 26, and 9 are common defaults) if a trader wants to experiment with different sensitivities.
Real-Life Example: Watching MACD on Infosys
Suppose a trader adds MACD to a daily Infosys chart. During a multi-week rally, they notice the MACD line sitting comfortably above both zero and the signal line, with tall histogram bars reflecting a wide gap between the two lines. As the rally loses steam, the histogram bars gradually shrink week over week, even before an actual crossover happens - something the trader notices simply by watching the bars, without needing to stare closely at the two lines themselves. When the MACD line eventually crosses below the signal line, the trader treats it as one data point worth folding into their broader view of the stock, alongside price action and volume, rather than an automatic decision by itself.
Analogy: Two Runners on a Track
Picture two runners on a track - one running at a naturally faster pace (the fast EMA) and one running slower (the slow EMA). The MACD line simply tracks the gap between them at every moment: when the faster runner pulls ahead, the gap grows; when the slower runner catches up or overtakes, the gap shrinks or flips. The signal line is like a smoothed average of that gap over recent laps, and the histogram is a bar chart of exactly how big that gap is right now. Watching the runners cross paths tells you something happened just now on the track - it doesn’t tell you who wins the race.
Common Beginner Mistakes
- Treating a MACD crossover as a certain buy or sell trigger, rather than one observation about the relationship between two EMAs.
- Ignoring the histogram entirely, when it often shows a shrinking or growing gap before an actual line crossover becomes visually obvious.
- Not realizing MACD is fundamentally built from EMAs, and skipping straight to crossovers without understanding what’s being compared underneath.
- Using MACD in isolation, without any other trend, support/resistance, or volume context.
Practical Tips
- Revisit Lesson 19 if the EMA concept feels shaky - MACD will make far more sense once that foundation is solid.
- Watch the histogram, not just the two lines - many traders find it a quicker visual cue for a strengthening or weakening relationship between the MACD line and signal line.
- Treat crossovers, like every signal in this module, as one input to combine with price action and other indicators, not a standalone trigger.
Practical Exercise
- Add MACD to a daily chart of Nifty 50 or a stock like Infosys. Watch the MACD line and signal line for two to three weeks, and note each time they cross, along with what the histogram bars are doing at that same moment.
- On the same chart, compare the MACD line's crossovers with the 20-period and 50-period EMA crossovers from Lesson 19 - notice how both are built from moving averages, just combined differently.
Mini Quiz
1. What is MACD built from, at its core?
MACD (Moving Average Convergence Divergence) is calculated from the difference between two EMAs of different periods - directly building on the EMA concept introduced in Lesson 19.
2. What are the three visual components of the MACD indicator?
MACD displays three parts together - the MACD line itself (the difference between two EMAs), a signal line (an EMA of the MACD line), and a histogram showing the gap between the two lines as bars.
3. What does a "bullish crossover" typically refer to in MACD?
A bullish crossover, in MACD terms, describes the MACD line crossing above the signal line - an event some traders watch as a shift in short-term momentum relative to the signal line's smoothed average of that momentum.
4. What does the MACD histogram visually represent?
The histogram bars grow taller as the MACD line and signal line move further apart, and shrink toward zero as the two lines converge - visually summarizing the same crossover relationship shown by the two lines themselves.
5. Does a MACD crossover guarantee a specific future price move?
Like every crossover-based observation in this course, a MACD crossover reflects something that has already happened in the calculation - it's watched by many traders as one useful signal among several, not a guaranteed predictor of future price.
6. Where does the MACD indicator appear once added to a TradingView chart?
MACD is an oscillator-type indicator (per the families introduced in Lesson 18), so it's plotted in its own dedicated panel below the price chart, separate from the price scale itself.
Frequently Asked Questions
What do the letters in "MACD" stand for?
MACD stands for Moving Average Convergence Divergence - describing how it tracks two moving averages converging toward each other or diverging further apart over time.
What are the common default periods used for MACD's two EMAs?
12 and 26 periods are the most commonly referenced default EMA lengths for the MACD line, with a 9-period EMA commonly used for the signal line - though these can all be adjusted in the indicator's settings.
Is a "bearish crossover" simply the opposite of a bullish crossover?
Yes - a bearish crossover describes the MACD line crossing below the signal line, generally the mirror image of a bullish crossover, and is watched by some traders as a possible shift in short-term momentum in the opposite direction.
Can MACD be used on intraday charts, not just daily ones?
Yes - MACD, like most indicators, can be applied to any chart timeframe. Its interpretation is broadly similar across timeframes, since it's simply calculated from whatever closing prices exist at that chart's periodicity.
Does the histogram add any genuinely new information beyond the two lines?
Not entirely new information, but it presents the same underlying relationship (the gap between the MACD line and signal line) in a way some traders find visually quicker to scan, especially for noticing when that gap is shrinking even before an actual crossover occurs.
Why does MACD use EMAs specifically, rather than SMAs?
MACD's design specifically uses EMAs because their extra weighting toward recent prices makes the resulting MACD line a little more responsive to fresh price changes than an SMA-based version would be - consistent with EMA's general behaviour covered in Lesson 19.
Is MACD considered a trend indicator, a momentum indicator, or both?
MACD is often described as blending both - it reflects trend direction (through the relationship between a faster and slower EMA) while also carrying momentum-like information (through how quickly that relationship is changing).
Can MACD be combined with RSI, from the previous lesson?
Yes - many traders use RSI and MACD together, since RSI focuses specifically on the speed and magnitude of price moves on a bounded scale, while MACD focuses on the relationship between two EMAs - two related but distinct lenses on momentum and trend.
Does a MACD crossover happening far above or far below the zero line mean anything different?
Some traders do pay attention to whether a crossover happens above or below MACD's zero line (where the two EMAs are exactly equal), treating it as additional context about the broader trend direction at the time of the crossover - though, as with every observation in this module, it's not a guaranteed signal.
Glossary
Key Takeaways
- MACD is built from the relationship between two EMAs of different periods, directly extending the EMA concept from Lesson 19.
- MACD displays three parts - the MACD line, the signal line, and a histogram showing the gap between them.
- A bullish crossover describes the MACD line crossing above the signal line; a bearish crossover describes the opposite.
- The histogram grows as the two lines diverge and shrinks toward zero as they converge, visually summarizing the same relationship.
- MACD is plotted in its own panel below the price chart, as an oscillator-type indicator.
- A MACD crossover describes a shift that has already happened - it's one observation many traders watch, not a guaranteed future signal.
Conclusion
MACD shows how far a simple idea - the moving average - can be extended by comparing two of them together, adding a signal line and histogram on top. With trend and momentum both covered through moving averages, RSI, and now MACD, the next lesson shifts to volatility, introducing Bollinger Bands - bands built around a moving average that widen and narrow as a market's volatility changes.
