TA School

MACD Indicator

Learn how the Moving Average Convergence Divergence (MACD) tracks trend changes, signal crossovers, and momentum strength.

intermediate level13 min read

Interactive Model

Interactive Visual Walkthrough

MACD Indicator

Step 1 of 7
MACD (12, 26, 9)MACD LineSignal Line
Trend Formation

On Day 1 to Day 2, price rises slowly from $100 to $102. The MACD Line and Signal Line sit slightly above zero, establishing a positive bias.

Why it matters: When MACD components are above the Zero Line, it indicates that short-term momentum is stronger than long-term momentum.

Introduction

The Moving Average Convergence DivergenceDivergenceAn event where the price of an asset moves in the opposite direction of a technical indicator (such as the RSI, MACD, or volume), often signaling a po...Read full glossary entry → (MACD) is a versatile trendTrendThe general direction in which a security or market is moving over time.Read full glossary entry →-following momentum indicator developed by Gerald Appel in the late 1970s. It displays the relationship between two moving averages of an asset's price, helping traders identify changes in trendTrendThe general direction in which a security or market is moving over time.Read full glossary entry → direction, strength, and momentum.


Why It Matters

  • Dual Functionality: Serves as both a trend-following indicator (using averages) and a momentum indicator (using crossovers).
  • Early Reversal Alerts: Signal crossovers and histogram contraction provide leading indications of trend deceleration.
  • Objective Signals: Provides clear, non-subjective buy and sell triggers based on moving average relationships.

Formula Explanation

The MACD indicator is built on three components calculated sequentially:

1. The MACD Line

The MACD Line measures the distance between the fast and slow EMAs.

Formula
MACD Line = EMA12 − EMA26

2. The Signal Line

The Signal Line is a smoothed version of the MACD Line.

Formula
Signal Line = EMA9(MACD Line)

3. The Histogram

The Histogram plots the distance between the MACD Line and the Signal Line.

Formula
Histogram = MACD Line − Signal Line

MACD Crossovers & Interpretation

  • Signal Line Crossovers:
    • Bullish Crossover: MACD crosses above the Signal Line (histogram turns green). Indicates accelerating upward momentum.
    • Bearish Crossover: MACD crosses below the Signal Line (histogram turns red). Indicates accelerating downward momentum.
  • Zero Line Crossovers:
    • Above Zero: The 12 EMA is above the 26 EMA, confirming a macro uptrendUptrendA market direction characterized by a sequence of higher highs and higher lows.Read full glossary entry →.
    • Below Zero: The 12 EMA is below the 26 EMA, confirming a macro downtrendDowntrendA market direction characterized by a sequence of lower highs and lower lows.Read full glossary entry →.

Trading Setup

The Bullish Crossover Entry

  1. Filter the Trend: Ensure the macro trend is positive (e.g. price is above the 50 SMA, or MACD is near or crossing above the Zero Line).
  2. Identify the Crossover: Wait for a bullish signal line crossover (MACD Line crosses above the Signal Line).
  3. Confirm with Histogram: Verify that the histogram prints its first positive green bar, and that volumeVolumeThe total number of shares, contracts, or units of a security traded during a specified time period.Read full glossary entry → is expanding.
  4. Entry: Enter long on the close of the crossover candle. Place the stop-loss orderStop-Loss OrderAn order placed with a broker to sell an asset when it reaches a specific price, designed to limit a trader's loss on a position.Read full glossary entry → below the recent swing low. Exit when a bearish crossover forms.

Common Beginner Mistakes

[!WARNING]

  • Trading Crossovers in Choppy Ranges: Taking every crossover signal in a flat, range-bound market. The moving averages will whipsaw back and forth, generating false signals.
  • Chasing Lagging Crossovers: Entering a trade late when a crossover occurs after the price has already made a large, extended move.
  • Ignoring the Zero Line: Buying bullish crossovers when the MACD is deep below the zero line without considering that the asset is in a major downtrendDowntrendA market direction characterized by a sequence of lower highs and lower lows.Read full glossary entry →.
  • Ignoring Histogram Deceleration: Staying in a trade when the histogram bars begin contracting, which signals that momentum is slowing down.

Key Takeaways

  • MACD is a trend-following momentum indicator showing the relationship between two moving averages.
  • The MACD Line is calculated by subtracting the 26-period EMA from the 12-period EMA.
  • The Signal Line is a 9-period EMA of the MACD Line, serving as a trigger for buy/sell signals.
  • The Histogram represents the distance between the MACD Line and the Signal Line.
  • Crossovers above/below the Signal Line and Zero Line indicate shifts in trend momentum.
Knowledge CheckQuestion 1 of 5

How is the MACD Line calculated?