OptiNod Academy
How to Read MACD: Lines, Histogram and Settings
Distinguish MACD, signal and histogram, match average types and timeframes, and test crosses, zero lines and shrinking bars with price rules.
A shrinking histogram shows that two lines are converging. It does not promise that price will reverse.
MACD is an indicator of the difference between a fast and a slow moving average. Most explanations of MACD focus on the moment the red and blue lines cross. It is easy to reduce the indicator to one event: golden cross, dead cross, buy, sell.
The difficulty is that moving averages use price data already observed. A crossover may follow a price turn, but how much it lags depends on the price path and settings. There is no fixed price level or halfway point at which it must appear.
Read the histogram before and after a crossover to see how the gap between the lines changes. That gives you another observation to test against price; it does not establish that entering earlier is better.

Crossovers Need a Clear Calculation Baseline
Search for the built-in MACD on TradingView, add it and inspect Source, Fast length, Slow length and Signal length. The three lengths count bars for the fast, slow and signal averages. They mean days only with daily calculation data.
Oscillator MA type selects the fast and slow average types; Signal MA type selects the signal average type. Each supports EMA or SMA, so check both against this article’s EMA baseline.
Timeframe selects the calculation data timeframe. When it differs from the chart, also check Wait for timeframe closes. A short chart bar can close while the indicator's longer bar is still open. Record source, both average types, calculation timeframe and close-based decisions as well as numerical lengths.
MACD measures the gap between a fast and a slow moving average. This article uses 12/26/9, closing price, EMA for both the oscillator and signal, and the chart timeframe. The lengths count chart bars: 12 on a 1-hour chart means 12 hourly bars, not 12 days. TradingView also lets you select SMA instead of EMA for the oscillator averages and, separately, for the signal line. Check those settings and any timeframe override before comparing charts. TradingView MACD settings.
With that baseline, the MACD line is the 12-bar EMA minus the 26-bar EMA; the signal is the 9-bar EMA of MACD. A bullish signal crossover occurs when MACD moves from below to above its signal. The official Pine example shows this calculation using closing prices.
Averages smooth price changes, so crossovers can arrive after a move has begun. That does not make every crossover late or confirm that a trend has reversed. An earlier histogram signal can also fail sooner. Compare both entry rules under the same costs and exit conditions before choosing one, and make the decision on completed bars.

The Histogram Shows a Changing Gap
The histogram equals MACD minus signal. Positive values mean MACD is above its signal; negative values mean it is below. Its distance from zero is the gap between those lines. If the values change sign between two completed bars, a crossover occurred between those observations; a sampled bar does not have to print exactly zero.
When bars become shorter toward zero, the gap is narrowing. It can widen again before crossing. Positive histogram bars can appear while the MACD line remains below zero, and negative bars can appear while it remains above zero. Histogram color alone therefore cannot tell you whether price is in an uptrend or downtrend.
For an arithmetic example, positive values of 10, 7, and 4 show a narrowing positive gap. The next value could be 2, −1, or 8. Negative values of −10, −7, and −4 also move toward zero, but from the other side. These are illustrative numbers, not an asset's historical readings.
Treat three consecutive contractions as a candidate condition to investigate, then check the histogram's sign, price location, and the point that would invalidate the idea.

Directly calculating 12/26/9 EMA on the same synthetic input from the RSI article shows the distinction. After 400 warm-up values, overall indices 406→407 have MACD rising 0.508→0.563 and signal rising 0.195→0.269, while histogram shrinks 0.313→0.294. Values shown use three decimal places; calculations use unrounded values. EMA starts at the first source value and continuously smooths with current-value weight 2 / (length + 1); the signal starts at the first MACD value, 0. Units follow the synthetic input, not real prices, dates or returns. This verifies an arithmetic case of rising MACD and shrinking histogram, not a prediction of the next price or trading performance.
Entries Need Direction and Market Context
You do not enter just because the histogram is getting shorter. Keep the original idea of a pullback within a trend, but define it precisely enough to test. The following research example has no verified performance result. Use completed 4-hour and 1-hour bars, the settings above, and ATR(14) on the 1-hour chart.
Long research exampleDirection: MACD on the most recently completed 4-hour bar is above zero.Setup: on the 1-hour chart, three consecutive histogram bars move toward zero while remaining negative: four successive readings satisfy h0 < h1 < h2 < h3 < 0. Here h0 is the comparison baseline, and h1, h2, and h3 are the three condition bars. The third condition bar, h3, trades at or below its 26 EMA and closes above that EMA.Entry: enter at the next 1-hour bar's open only if that price is above the stop below.Stop: use the lowest low of the 1-hour bars corresponding to h1, h2, and h3 minus 0.25 × ATR(14), measured on h3. Keep that stop fixed.Invalidation: if a completed histogram bar moves farther below zero than the preceding bar, exit at the following bar's open. Also exit at the following open if no positive histogram bar has closed within three bars after entry. The price stop remains active throughout.
A subsequent bullish crossover says that MACD has moved above its signal. It says nothing about whether price is above the entry, and the stop may be reached first. A gap can also produce a worse fill than the chosen stop price.
To research the short version, reverse the conditions: completed 4-hour MACD below zero, three positive 1-hour histogram bars contracting, the third bar trading at or above the 26 EMA but closing below it, and entry at the next open below the stop. Keep the stop fixed above the highest high of the three bars by 0.25 ATR, measured on the third bar. Exit at the following open on renewed positive expansion or after three bars without a negative histogram close; the price stop stays active. Test the two directions separately with fees and slippage.

Distinguish the MACD Zero Line From Histogram Zero
With the EMA baseline, MACD = 0 means the 12 EMA equals the 26 EMA. MACD above zero means the fast average is higher; MACD below zero means it is lower. This describes the ordering of two averages on the selected timeframe. It does not establish that price must continue in that direction.
Histogram = 0 means MACD equals its signal. A signal crossover and a MACD zero-line crossover are different events. Both can appear in the same pane, so name the series whenever you write a rule involving “above zero.”
For example, MACD at −20 and signal at −25 produce a positive histogram of +5 even though the fast EMA is still below the slow EMA. MACD at +20 and signal at +25 produce a negative histogram of −5 even though the fast EMA is higher. These arithmetic examples show why “green histogram” and “uptrend” are not interchangeable.
Use MACD's sign as a timeframe-specific filter if your research calls for one. Then evaluate price and histogram separately instead of treating any contraction as a confirmed pullback or reversal.

Divergence Shows a Disagreement, Not a Ranking Over RSI
RSI expresses the balance of gains and losses from 0 to 100; MACD expresses momentum through the difference between two moving averages. MACD is unbounded and follows the source units, so do not directly compare its magnitude across different price scales. Agreement uses the same price data and is not two independent probability guarantees.
When price makes a higher high while the MACD line makes a lower high at the corresponding price swings, bearish divergence is a candidate warning. For bullish divergence, compare lower price lows with higher MACD lows. State whether you are using the MACD line or the histogram, and keep that choice consistent.
The fast and slow averages normally use different lookback lengths on the same timeframe. They are not two timeframes. MACD's calculation alone does not establish that its divergence is more reliable than RSI's; such a comparison needs the same market, swing definition, entry, exits, and costs.
As an illustrative example, suppose price makes a higher high while the corresponding MACD values fall from 60 to 35. The second value is 25 units lower, approximately 41.7% below the first, not half of it. That difference describes the observations and does not predict the next price level or a two-week return.
To make a chart review reproducible, one possible swing definition is a high above the highs of the two bars on each side. The swing only becomes confirmed after those two later bars close. Mark that confirmation time before considering any entry; placing a trade on the earlier swing bar would use information that was not yet available. If an entry rule depends on that high holding, a break above the chosen stop invalidates the trade idea even though the historical divergence remains visible.

Ranges and Persistent Trends Can Both Defeat the Signal
In a range, MACD can cross its signal repeatedly while price returns toward the same levels. The number of crossings and losing trades depends on the instrument, timeframe, rules, and costs. There is no basis here for a fixed monthly crossover count or a claim that more than half must fail.
An ADX threshold such as 20 can be a research filter, but it needs its own period setting and validation. It is not a universal boundary between useful and useless MACD signals. For the example above, record whether price is breaking recent highs and lows or returning inside a range, then compare the results with and without a clearly specified filter.
In a persistent trend, divergence can also recur while price continues in the original direction. Repeated warnings do not add up to a guaranteed reversal. Additional indicators can disagree or share the same underlying price information; they do not remove the need for a stop and an explicit invalidation rule. Skip a trade when you cannot identify the price that makes its premise fail.

Use Other Evidence to Define the Trade, Then Test It
MACD alone shows only part of the price behavior. Record these three dimensions before assessing a setup.
- Higher-timeframe direction: name the series and timeframe, such as “MACD above zero on the last completed 4-hour bar.” An unfinished 4-hour bar can change while the 1-hour chart advances.
- Price level: identify support, resistance, or an average with a rule available at the time. Write the stop before entry and include its distance when assessing risk.
- Volume: specify the exchange, instrument, and comparison window. Falling volume together with contraction is an additional observation; it does not prove a reversal or reveal who is absorbing orders.
Agreement among these observations is a hypothesis to test, not a guarantee. Log the settings, completed-bar timestamps, entry and exit rules, costs, and losing examples as well as winning ones. The useful MACD signal is one whose failure you can recognize and measure.
To connect settings with trade records, inspect the trade-analysis example and then use TradingView trade CSV analysis with your strategy trade list. Compare indicator changes with the same instrument, interval, execution and costs; distinguish calculation diagrams from strategy performance. Continue with the technical-indicator series.
For applying a strategy and matching costs and dates, follow the measured example in the TradingView backtest guide.