Module 4 · Lesson 6 of 12 · Volume and indicators · About 5 minutes

MACD Explained: Lines, Histogram and What Crosses Mean

On this page
  1. What you will learn
  2. What is MACD made of?
  3. What does the histogram show?
  4. MACD diagram
  5. What do the crosses describe?
  6. Divergence with MACD
  7. Why defaults are not special
  8. What this does not tell you about MACD
  9. Method in Practice
  10. Check yourself
  11. Reflect on your own process
  12. Sources

Before you read: RSI and Stochastic Oscillators: What Overbought Really Means

What you will learn

  • How the MACD line, the signal line and the histogram are calculated.
  • What a zero-line cross and a signal-line cross describe.
  • Why MACD inherits the lag of the moving averages it is built from.

What is MACD made of?

If you subtract a slow average from a fast one, what does the gap between them tell you?

MACD stands for moving average convergence divergence. It was introduced by Gerald Appel and uses three parts, with default settings of 12, 26 and 9:

  1. MACD line = 12-period EMA of closes − 26-period EMA of closes.
  2. Signal line = 9-period EMA of the MACD line.
  3. Histogram = MACD line − signal line.

When the fast EMA is above the slow EMA, the MACD line is positive. When the two averages move apart, the line moves away from zero; when they come together, it moves back toward zero. That is the “convergence” and “divergence” in the name.

Unlike RSI, MACD is not bounded between 0 and 100. It is measured in price units, so a MACD value of 2 means something different on a $20 stock than on a $2,000 one. Some platforms offer a percentage version to make different markets comparable.

What does the histogram show?

What exactly is the distance between the two lines?

The histogram plots a subtraction, in the same price units as the MACD and signal lines:

Histogram = MACD line − signal line.

  • Positive histogram: MACD is above its signal line.
  • Negative histogram: MACD is below its signal line.
  • Zero histogram: the two lines are equal at that calculation point.

The histogram is not another average of the two lines. It can contract while both lines rise, because their difference is getting smaller. “Positive” does not by itself mean the MACD line is above zero or that the underlying price is rising.

Fictional calculation — chosen MACD inputs, not a reconstructed price chart: Assume a 9-period EMA signal, so the update weight is 2/(9+1) = 0.2. Start with a prior signal value of −0.50. For each next observation, signal = 0.2 × current MACD + 0.8 × prior signal. The table deliberately supplies the MACD inputs; it does not claim to recreate a real 12/26 price history.

Observation Supplied MACD Signal calculation Signal Histogram = MACD − signal
A −1.00 0.2×(−1.00)+0.8×(−0.50) −0.60 −0.40
B −0.40 0.2×(−0.40)+0.8×(−0.60) −0.56 +0.16
C +0.20 0.2×0.20+0.8×(−0.56) −0.408 +0.608

Between A and B, MACD changes from below its signal to above it. The histogram changes from negative to positive at that same comparison event, not in a separate guaranteed earlier stage. At B the MACD and signal remain below zero. At C the MACD is above zero. This is one constructed path, not a universal ordering of events.

MACD diagram

Left, two aligned panes for three fictional observations A, B and C. Top: the MACD line (−1.00, −0.40, +0.20) and its dashed signal line (−0.60, −0.56, −0.408) against 0 and −1.0 gridlines; the A-to-B interval is shaded and the later point between B and C where MACD crosses zero is circled, with a key: "A to B: one comparison" and "B to C: a different equality". Bottom: the histogram (MACD − signal) as bars of −0.40, +0.16 and +0.608 on a zero line. Right: the definitions of MACD (fast MA − slow MA), signal (selected moving average of MACD) and histogram (MACD − signal), and the table of supplied and calculated values.
Read the diagram step by step
  1. Fictional supplied MACD inputs; signal EMA arithmetic illustration. No price or return forecast.
  2. 9-period EMA weight: 2/(9+1) = 0.2. Prior signal = −0.50. New signal = 0.2 × current MACD + 0.8 × prior signal.
  3. Schematic joins, not intrabar timestamps.
  4. MACD moves from below signal to above it. The histogram changes from negative to positive for that same comparison, not as an independent earlier confirmation. At B, MACD and signal are still below zero.
  5. MACD changes from negative to positive in this supplied path. This MACD zero crossing compares fast MA with slow MA. This order is not universal.
  6. Equality versus crossing
  7. Histogram zero = MACD equals signal. MACD zero = fast MA equals slow MA. A zero touch is equality only; a crossing requires a change of side.
  8. No universal crossover order or price outcome is implied. An unfinished bar can change or reverse an apparent cross.
  9. Education only. Not a trade recommendation.

Illustrative diagram constructed for teaching. Not real market data.

The histogram is the point-by-point difference of MACD and signal. Its zero crossing and the corresponding MACD/signal cross describe the same comparison. MACD crossing its own zero line is a different condition. No order or price outcome is guaranteed.

Try it on a chart

  1. Find the MACD line, the signal line and the histogram below the price.
  2. Find a place where the histogram crosses zero.

TradingView Advanced Real-Time Chart

TradingView chart. Showing it connects your browser to TradingView, which may set cookies or store settings and similar identifiers in your browser.

Privacy details

Charts and quotes are TradingView's data, not ours, and may be delayed.

Open the full practice chart

What do the crosses describe?

Which equality is being crossed?

A MACD/signal cross compares MACD with the signal. Its histogram zero-cross is the same event, because histogram = MACD − signal. With the same inputs and bar confirmation, these cannot be independent early and late confirmations. A zero touch is equality; a crossing requires a change from one side to the other.

A MACD zero-line cross compares MACD with zero. Since MACD = fast average − slow average, this is the fast/slow-average crossing expressed as a difference. It is not the same equality as MACD = signal.

There is no universal chronology in which histogram, signal cross, zero cross and a price reversal must occur. The supplied example happens to show a bullish signal cross while MACD is still negative, followed by MACD becoming positive. Other paths, reversals and repeated crosses are possible; no actual price reversal is established by a cross. All calculations depend on chosen inputs and settings. An unconfirmed live bar can change the lines and reverse an apparent cross before the bar closes.

These are descriptions of calculated relationships, not forecasts, trade instructions or independent evidence counted twice.

Divergence with MACD

If price makes a higher high but MACD does not, what has slowed?

A divergence between price and MACD means the gap between the fast and slow averages was smaller on the latest push than on the one before. It shows that the move slowed in average terms. As with any oscillator divergence, it can persist, and it is easy to see in hindsight on a chart that has already reversed.

Why defaults are not special

What changes when the averaging choices change?

TradingView’s standard MACD settings use fast length 12, slow length 26 and signal length 9. The averaging types can be configured; check both oscillator and signal settings rather than assuming every chart uses the same implementation.

Changing lengths or smoothing changes the values and timing of apparent crosses. The same numbers on a different bar interval describe a different history. A shorter setting is not inherently more accurate; it generally reacts differently and may produce more changes. Defaults are a starting convention, not a validated forecasting advantage.

What this does not tell you about MACD

  • MACD describes the relationship between two past averages. It does not predict where price will go.
  • Values are in price units, so MACD readings are not comparable across markets without adjustment.
  • Crosses lag and can repeat often in ranges.
  • Nothing here is a signal to trade.

Method in Practice: confirmation, and what the lag costs

Fictional example. John, Harbor Index futures, the prices, times, costs and results are all invented for teaching. This shows how a written plan can be built and tested. It is not a recommendation, and nothing here says how often this idea works.

Try it on a real chart. Look at the chart in this lesson, then test this idea yourself on past sessions with bar replay. Keep your own count, including the days with no trade.

The idea. MACD is built from moving averages, so it lags (this lesson). John uses it as one confirmation on a breakout, counted only on closed bars. The failed replay and the no-trade replay both show the cost of the lag: a late entry further from his wrong-if line, and a move that left without him.

John's plan

Setup
opening range high (08:30–09:00) at 100.80
Enter if
a 5-minute bar closes above 100.80 with MACD(12,26,9) above its signal line on that closed bar. Buy. Skip if the close is more than 0.30 above 100.80.
Wrong if
a 5-minute bar closes below 100.60
Manage
take half at 101.35, the rest at 101.80 or by 14:30
Risk
$150 maximum, costs included

Three outcomes

  • Worked: MACD confirmed on the first close above → +$111

  • Failed: MACD confirmed two bars late, so the entry was higher, then price fell back → −$122, inside the limit

  • No trade: by the time MACD confirmed, price was too far above the level → $0

Show the full replays
ItemPlan
ContextOpening range 08:30–09:00. High 100.80
Entry conditionA 5-minute bar closes above 100.80, at most 0.30 above it, with MACD(12,26,9) above its signal line on that closed bar. Buy 2 at market after that close
Wrong ifA 5-minute bar closes below 100.60. Exit at market after that close
ManagementTake profit on half at 101.35 (limit) and move the exit for the rest to the entry price (stop). Rest at 101.80 (limit). Time limit 14:30 CT
Risk cap and size$150. With entries at most 0.30 above 100.80, exiting just under 100.60 is planned to cost at most about $70 per contract, so 2 contracts
Not trading ifScheduled major release within the hour, or no setup by 12:00 CT

Replay A: worked

Time (CT)What happenedJohn
09:20–09:25Closes 100.92. MACD above its signal lineCondition met: buys 2 at market, filled 100.97
09:25–10:40Trades 101.35 at 10:40Sells 1 at 101.35 (limit). Exit for the other moves to 100.97
10:40–12:55Never back to 100.97, trades 101.80 at 12:55Sells the last 1 at 101.80 (limit)

Result after costs: +0.38 point = +$38, +0.83 point = +$83, commissions −$10. Net +$111. Journal: "Confirmation on the first close above. Both exits were limits."

Replay B: failed

Time (CT)What happenedJohn
09:35–09:40Closes 100.90. MACD still below its signal lineNot confirmed: waits
09:40–09:50Two more bars. MACD crosses above on the second, which closes 101.03Condition met (0.23 above the level): buys 2 at market, filled 101.08
09:50–10:15Stalls at 101.15, falls, a bar closes 100.57Wrong-if met: sells 2 at market, filled 100.52

Result after costs: 2 × −0.56 point = −$112, commissions −$10. Net −$122. Journal: "The lag put my entry 0.13 higher than the first close above. That made the loss bigger. Logged for the weekly review."

Replay C: no trade

Time (CT)What happenedJohn
09:10–09:15Closes 100.95. MACD below its signal lineNot confirmed
09:15–09:45Climbs fast. MACD crosses above on a bar that closes 101.450.65 above the level, over the 0.30 limit: no trade
09:45–12:00Reaches 101.90Watches only

Result: $0. Journal: "By the time MACD agreed, the move was mostly done. That's the price of confirmation."

Test it yourself

  • Write whether a cross counts on a live bar or only on a closed bar. This lesson shows why it matters.
  • Replay every close above the level. Log how many bars MACD lagged each time.
  • Compare with and without MACD at the same costs. Count the moves the lag made you miss.

Where it breaks

  • The lag means confirmation often comes late (the failed and no-trade replays).
  • In ranges, MACD crosses back and forth often.
  • MACD values are in price units, so readings don't compare across markets.

Calculators: position sizerisk/rewardexpectancy

Reflection question: What does waiting for confirmation cost in your plan, and have you counted it?

Check yourself

  1. If fast MA = 105, slow MA = 102 and signal = 2.40, calculate MACD and histogram, with units. Hint: fast minus slow.
  2. At B in the fictional table, is a positive histogram inconsistent with negative MACD?
  3. Can a histogram zero cross be a separate guaranteed advance warning of the corresponding MACD/signal cross on the same confirmed calculations? Hint: MACD line minus signal line.
  4. What does MACD = 0 compare? Does a single zero touch prove a sustained crossing or predict a price turn? Hint: when is fast minus slow equal to zero?

Reflect on your own process

For your own notes; there is no score and no right answer.

  1. Does your written plan say whether a MACD cross counts on a live bar or only after the bar closes?
  2. If your checklist lists both a histogram flip and a signal-line cross, how will you avoid counting one event twice?
  3. Which MACD settings and average types does your journal record for each chart you review?
  4. What does waiting for confirmation cost in your plan, and have you counted it?

Sources

Last reviewed . Spotted a mistake? Report an error.