MACD combines trend direction, momentum strength, and reversal signals into a single three-component tool. Where RSI compares recent gains to losses, MACD compares two moving averages to extract momentum from their relationship — making it the most versatile single momentum tool in common use.
The Moving Average Convergence Divergence, almost always called MACD (pronounced 'Mac-D'), is the other major momentum oscillator alongside RSI. Developed by Gerald Appel in the late 1970s, MACD has become standard equipment in technical analysis because it combines several useful pieces of information into a single tool: trend direction, momentum strength, and potential reversal signals. Where RSI compares recent gains to recent losses, MACD compares two moving averages of different periods to extract momentum information from their relationship.
The conceptual insight that makes MACD useful: when a short-period moving average is pulling away from a long-period moving average, momentum is accelerating in the direction of the divergence. When the short-period moving average is converging back toward the long-period moving average, momentum is decelerating. MACD captures this convergence and divergence behavior in a single line that traders can read for trend strength and potential reversals.
This lesson covers what MACD is, how it's calculated, how its three components work together, the specific signals MACD provides, common mistakes that destroy traders who use it mechanically, and how to integrate it with the broader analytical framework.
| Term | Definition |
|---|---|
| MACD (Moving Average Convergence Divergence) | A momentum oscillator that displays the relationship between two exponential moving averages of price. Developed by Gerald Appel in the late 1970s. MACD has three components: the MACD line, the signal line, and the histogram. |
| MACD line | The primary line in the MACD indicator. Calculated as the difference between the 12-period EMA and the 26-period EMA (the default settings). When the 12-period EMA is above the 26-period EMA, the MACD line is positive. When the 12-period EMA is below the 26-period EMA, the MACD line is negative. |
| Signal line | A 9-period EMA of the MACD line. Serves as a smoothed reference for the MACD line. Crossovers between the MACD line and signal line are commonly used as trade signals. |
| MACD histogram | A bar chart displayed alongside the MACD and signal lines. Each bar represents the difference between the MACD line and the signal line at that bar. Positive histogram bars (above zero) mean the MACD line is above the signal line; negative bars (below zero) mean the MACD line is below the signal line. |
| Zero line crossover | When the MACD line crosses above or below zero. A zero line cross occurs when the underlying 12-period and 26-period EMAs cross each other (the MACD line equals zero when they're equal). Zero line crossovers are interpreted as significant trend change signals. |
| Signal line crossover | When the MACD line crosses above or below its signal line (the 9-period EMA of the MACD line). Signal line crossovers occur more frequently than zero line crossovers and are often used as earlier (though less reliable) trade signals. |
| Bullish MACD crossover | When the MACD line crosses above the signal line, typically interpreted as a bullish momentum signal. The crossover can occur above or below zero, with different implications for each. |
| Bearish MACD crossover | When the MACD line crosses below the signal line, typically interpreted as a bearish momentum signal. |
| MACD bullish divergence | When price makes a lower low but MACD makes a higher low. Like RSI divergence, signals that the bearish momentum is fading even as price continues lower. Often precedes meaningful reversals. |
| MACD bearish divergence | When price makes a higher high but MACD makes a lower high. Signals that bullish momentum is fading even as price continues higher. |
| Histogram divergence | A specific form of MACD divergence that uses the histogram rather than the MACD line. Some analysts find histogram divergence to be more sensitive and earlier than MACD line divergence because the histogram captures the rate of change of the MACD-signal relationship. |
| Default settings | The standard MACD parameters of 12, 26, and 9 (12-period EMA, 26-period EMA, 9-period signal line EMA). These defaults come from Appel's original specification and remain standard across all platforms. Changes to these defaults should be backed by specific backtested justification rather than arbitrary preference. |
When a reader adds MACD to a chart and opens its settings, several configurable parameters appear.
The MACD calculation involves several steps. Understanding each step reveals what MACD is actually measuring.
Step 1: Calculate the 12-period EMA. Using the EMA calculation from Lesson 30, calculate the 12-period exponential moving average of closing prices. This is the 'fast' EMA.
Step 2: Calculate the 26-period EMA. Similarly, calculate the 26-period EMA of closing prices. This is the 'slow' EMA.
Step 3: Calculate the MACD line. Subtract the 26-period EMA from the 12-period EMA:
MACD Line
MACD Line = 12-period EMA − 26-period EMA
When the 12-period EMA is above the 26-period EMA, the MACD line is positive. When below, negative. The magnitude reflects how far apart the two EMAs are.
Step 4: Calculate the signal line. Calculate the 9-period EMA of the MACD line:
Signal Line
Signal Line = 9-period EMA of MACD Line
The signal line is a smoothed version of the MACD line.
Step 5: Calculate the histogram. Subtract the signal line from the MACD line:
Histogram
Histogram = MACD Line − Signal Line
When the MACD line is above the signal line, the histogram is positive. When below, negative.
Suppose the 12-period EMA is 102 and the 26-period EMA is 100: MACD Line = 102 − 100 = 2 The MACD line reads +2. The fast EMA is above the slow EMA by 2 points, indicating recent prices have been net positive relative to the broader average. Suppose the prior day's MACD line was 1.5, and the 9-period EMA of recent MACD values gives a signal line of 1.7: Histogram = 2 − 1.7 = 0.3 The histogram reads +0.3. The MACD line is above the signal line, meaning momentum is currently above its smoothed reference.
MACD is essentially comparing two moving averages in three different ways simultaneously. The MACD line itself shows whether the fast EMA is above or below the slow EMA. The signal line shows whether this MACD value is above or below its recent average. The histogram shows the relationship between the MACD line and signal line. This three-layer construction is why MACD provides more information than a simple moving average crossover. The MACD line corresponds to the underlying EMA crossover. The signal line crossover provides an earlier (though less reliable) signal of momentum change. The histogram shows the rate of change of the MACD-signal relationship, which can identify momentum changes even earlier.
Each of MACD's three components provides different information that integrated readers use together.
Like RSI, MACD's signals carry different significance depending on whether the market is trending or ranging.
Identifying which regime applies. Several methods help identify whether MACD signals should be treated as reliable. ADX (covered in Lesson 38) measures trend strength directly. The relationship between price and longer-period moving averages signals trend versus range. The chart pattern context (consolidation patterns versus trending patterns) provides structural information. The integrated reader uses these contexts to determine whether MACD signals warrant action or skepticism.
Liberated Stock Trader's comprehensive backtesting of 606,422 test trades on the MACD indicator found a low reliability of 26% on a day trading 5-minute chart and only 3% on a daily chart for standalone MACD strategies. Backtesting on 30 Dow Jones Industrial Average stocks over 20 years showed MACD underperforming buy-and-hold 76% of the time, with 29 of 30 DJIA stocks failing to beat buy-and-hold using standard MACD settings.
QuantifiedStrategies' analysis of MACD accuracy reports that MACD strategies have approximately an 81.41% historical success rate with a profit factor of 1.51 when used in specific combined approaches, though standalone MACD use shows substantially lower performance. Their backtest of a specific MACD strategy on the S&P 500 from 1960 showed 71.5% accuracy across 112 trades.
A combined MACD and RSI strategy demonstrated a 73% win rate over 235 trades on semiconductor ETFs (SMH) from 2001 to present, with an average gain of 0.88% per trade including commissions and slippage. The improvement from standalone MACD use to combined MACD+RSI use illustrates the principle that momentum indicators work better in confluence than in isolation.
Academic research from arxiv.org on MACD strategy effectiveness found that the win rate of strategies using only the MACD indicator is less than 50%. However, win rates substantially improve when MACD is combined with other momentum indicators like Money Flow Index (MFI) or RSI. The research concludes that while all MACD trading strategies can generate positive returns, performance is poor without using other momentum indicators alongside MACD.
The pattern across MACD research is consistent and matches what we've seen with other indicators. Standalone MACD signals produce mediocre results. Combined approaches that integrate MACD with other tools produce substantially better results. The strongest performance comes from combinations like MACD+RSI+mean reversion filters, which can reach 73% win rates compared to sub-50% for MACD alone.
The integrated chart for this lesson follows the progressive integration principle.
Cup and handle pattern (Lesson 22) with morning star at cup bottom, doji at handle low, bullish MACD crossover during cup recovery, and MACD bullish divergence — progressive integration of candle patterns, chart patterns, and MACD
Reading the MACD chart through all three layers
This chart shows what the integrated reading looks like with MACD added below the price chart. The chart includes a cup and handle pattern from Lesson 22, two named candle patterns from Lessons 1-13 (morning star and doji), and the MACD with its signal line, histogram, bullish divergence, and signal line crossover.
The left rim and cup decline (candles 1-9). Price declines from the left rim, forming the left side of the cup. The MACD line is negative and the histogram (red bars) extends below zero, indicating bearish momentum. As the decline progresses and approaches the cup bottom, notice that the histogram bars start shrinking even though they remain negative — this is an early signal that bearish momentum is fading even as price continues lower.
The cup bottom approach (candles 10-12). Price reaches the cup bottom area. The MACD line continues to bottom out, and the histogram has shrunk substantially.
Signal 1 — Morning star at the cup bottom. A morning star three-candle pattern forms at the cup's bottom. From Lesson 7, this is a powerful bullish reversal pattern. From Lesson 22, this is the structural bottom of the cup formation. The MACD at this moment shows the histogram approaching zero and the MACD line preparing to turn upward — momentum is confirming what the candle pattern suggests.
The cup recovery (candles 13-17). Price rallies from the cup bottom toward the right rim. The MACD line crosses above the signal line (signal 3 in the chart). The histogram has flipped from red (negative) to green (positive) and is growing. This is a textbook MACD bullish crossover signal occurring at exactly the right structural moment.
The right rim formation (candles 18-21). Price completes the cup by reaching the right rim, approximately the same level as the left rim. The MACD line peaks and the histogram reaches its maximum positive extension as the cup completes.
The handle development (candles 22-25). Price pulls back from the right rim to form the handle. The MACD line declines as the pullback develops, and the histogram shrinks. This is normal MACD behavior during a healthy handle pullback — momentum cools but doesn't reverse decisively.
Signal 2 — Doji at the handle low. A doji forms at the handle's bottom. From Lesson 2, the doji shows pure indecision at the structural moment. The MACD at this point shows the histogram approaching but not crossing zero, and the MACD line approaching but not crossing the signal line. The momentum is preparing to resume bullishly without ever fully turning bearish.
The handle resolution and breakout (candles 26-31). Price rallies from the handle low, breaks above the right rim resistance, and continues higher. The MACD line crosses back above the signal line, the histogram grows rapidly positive, and both are now well above the prior peak — momentum is confirming the breakout structurally.
Signal 4 — The bullish divergence pattern. Looking back at the chart, notice that during the cup decline, price made a lower low at the cup bottom compared to the left rim. But on the MACD, the corresponding low at the cup bottom is higher than the MACD low during the steepest part of the cup decline. This is bullish divergence — price made a lower low but MACD made a higher low. The momentum was already signaling that the bearish trend was exhausting even as price continued lower into the cup bottom.
This divergence preceded the morning star candle pattern and the eventual cup and handle completion. A trader watching MACD divergence had advance warning of the reversal well before any of the structural signals confirmed it.
What this integrated chart teaches together
Several pedagogical points emerge.
MACD divergence often precedes chart pattern completion. The bullish divergence developed during the cup formation, before the right rim formed completely and well before the handle resolved. MACD provided advance warning of the eventual reversal that the chart pattern eventually confirmed.
Histogram patterns provide texture beyond just crossovers. The shrinking red bars during the late cup decline, the histogram flipping green at the morning star, the growing histogram during the cup recovery, the shrinking histogram during the handle, and the explosive histogram growth at the breakout — each of these patterns adds information beyond the simple MACD line position.
Signal line crossovers in confluence with chart patterns are stronger than crossovers in isolation. The bullish MACD crossover that occurs as the cup recovery develops happens at exactly the right structural moment. The crossover combined with the chart pattern context creates multi-layer signal that mechanical MACD trading wouldn't capture.
MACD remains positive throughout the handle without crossing below the signal line decisively. This is structurally significant. A handle that produced a meaningful MACD bearish crossover would suggest more substantial trend reversal rather than a brief consolidation. The fact that MACD stayed mostly positive through the handle confirms the handle is a continuation pattern within a larger uptrend, not a reversal.
During the cup decline. A trader sees MACD declining and histogram extending negative — bearish momentum is confirmed. Not a good time to buy. The disciplined trader watches for signs of momentum exhaustion before considering long entry.
As bearish momentum fades. The histogram bars start shrinking even while still negative. This is an early warning that the decline may be approaching exhaustion, but not yet a buy signal — the MACD line is still below zero and below its signal line.
At the morning star at the cup bottom. The candle reversal pattern forms with MACD showing fading bearish momentum and a histogram approaching zero. This is a confluence signal — candle reversal at structural cup bottom with MACD confirming exhaustion. Small starter long position.
At the MACD bullish crossover (signal 3). The MACD line crosses above the signal line as the cup recovery develops. This crossover happens at the same time as price is approaching the cup's left rim. Multi-layer confluence: chart pattern recovery, candle bullish action, MACD crossover. Add to position or initiate position if no starter taken.
At the right rim approach. Price reaches the cup's right rim — structural resistance from the left rim. Some traders take partial profits here in case the rim acts as resistance and the handle takes time to develop. Others hold the full position expecting the handle and eventual breakout.
During the handle pullback. MACD declines but doesn't decisively cross below the signal line. The histogram shrinks but doesn't flip strongly negative. This is normal handle behavior — momentum cools but doesn't reverse. Hold the position.
At the doji at the handle low. Indecision at the structural moment with MACD preparing to turn back up. This is the entry opportunity for traders who waited or the add opportunity for traders already in position.
At the breakout above the right rim. MACD shows renewed bullish crossover and rapidly growing positive histogram — momentum is confirming the breakout with strong directional signal. Hold full position. Some traders trail stops up to the broken rim level (which should now act as support).
Not every MACD divergence resolves into a complete reversal. Not every MACD crossover marks a sustained directional move. The integrated framework that combines MACD with chart patterns and candle signals produces higher-conviction setups than mechanical MACD trading, but individual signals still vary in outcome. The discipline of taking confluence signals systematically produces consistent results over time even though individual instances aren't always optimal.
Lesson 36 covers the other major momentum oscillators — Stochastic, Williams %R, and CCI — as a comparative lesson. With RSI and MACD now covered as the foundational momentum tools, the remaining oscillators are best understood comparatively rather than each getting equal depth. Each has specific characteristics that distinguish it from RSI and MACD, and understanding when each is appropriate completes the momentum analysis toolkit.
Key Takeaways
A trader is analyzing MACD on a stock chart. The MACD line is at -0.5, the signal line is at -0.8, and the histogram bars are small but growing positive. The stock's price is still declining. What is the most accurate interpretation?
In this lesson
400 — Technical Indicators — Integration and Methodology