reference · Technical analysis

MACD: Line, Signal and Histogram Explained

MACD compares a faster exponential moving average with a slower one. Its signal line smooths that difference, while the histogram commonly displays the difference between MACD and the signal.

TradeCopier Editorial TeamPublished Updated
Layered glass chart shapes illustrating different ways to examine market movement
Editorial illustration. Examples and calculations below state their own assumptions.

Scope and assumptions

  • The eight-bar paths are synthetic positive-price examples with no missing closes and no executed trades.
  • The 2/3/2 fixture seeds each EMA from its first required valid inputs; all later updates use alpha 2/(n+1).
  • The ten-times comparison scales the whole price history and seeds, not only the last quote.
  • CSV values are rounded to 12 decimals for display and should not be used as recursive calculation inputs.

Three quantities, not three independent signals

A common construction uses a 12-period EMA minus a 26-period EMA for the MACD line and a nine-period EMA of that line for the signal. The histogram is MACD minus signal. Fidelity documents this common setup. All three ultimately transform the same price history; agreement between them is not three independent pieces of evidence.

An EMA updates as previous EMA + alpha × (new price − previous EMA), with alpha commonly 2 / (n + 1). Initialization can use a seeded simple average or other conventions. A sufficiently long warm-up reduces, but does not magically eliminate, discrepancies caused by different history or missing observations.

Work through the components

Suppose a hypothetical fast EMA is 105.20 and the slow EMA is 104.70. MACD is +0.50 price units. If its signal line is +0.35, the histogram is +0.15. The fast average is above the slow average, and their difference is above its own smoothed value.

At the next completed bar, suppose the averages are 105.00 and 104.65. MACD is now +0.35. If the previous signal was +0.35 and the signal update receives that same value, it stays +0.35; the histogram is zero. The averages still have a positive difference, even though MACD has lost its earlier lead over the signal.

One bar later, let MACD equal +0.20. Using a nine-period EMA coefficient of 0.2, the signal becomes 0.35 + 0.2 × (0.20 − 0.35) = 0.32. The histogram is −0.12. A negative histogram therefore does not necessarily mean MACD is below zero or that the fast price average has fallen below the slow one.

Know what crossed

A zero-line crossing concerns fast versus slow price averages. A signal crossing concerns MACD versus its own smoother. The event time can differ. Some platforms render their principal MACD series as bars, making the word histogram ambiguous; inspect the indicator documentation and series labels before comparing screenshots.

MACD is expressed in the instrument’s price units and is not bounded like RSI. A reading of 2 has a different scale on a ten-unit instrument than on an instrument priced in thousands. Splits, adjusted history and continuous-futures adjustments can also alter past price differences. Cross-instrument comparisons require a declared normalization.

PPO versus MACD: normalize the difference explicitly

The Percentage Price Oscillator, or PPO, divides the fast-minus-slow moving-average difference by the slow average and multiplies by 100. In the EMA convention used here, PPO = 100 × (fast EMA − slow EMA) / slow EMA. StockCharts documents this denominator, an EMA of PPO as its signal, and PPO minus that signal as its histogram. Its common periods are 12, 26 and 9, but the convention and initialization must accompany any comparison.

MACD carries price units; PPO is a percentage of the slow EMA. Neither is an investment return, a probability or a position size. PPO's signal must smooth historical PPO values. Dividing the current MACD signal by the current slow EMA is generally a different calculation because the denominator changes over time.

Reproduce a small example from the first observation

Use eight invented completed-bar closes: 100, 110, 100, 130, 90, 140, 80 and 150. The intentionally exaggerated path makes arithmetic differences visible. It is not observed market data. Use fast EMA 2, slow EMA 3 and signal EMA 2 for both oscillators. These short periods are a teaching device, not recommended trading settings.

Seed each price EMA with the simple mean of its first required closes, then update with alpha = 2 / (n + 1). Fidelity's EMA explanation describes recursive updates and a simple-average initialization. In this fixture, fast EMA first exists at bar 2, slow EMA at bar 3, and MACD/PPO at bar 3. Seed each two-period signal with its own first two available oscillator readings at bar 4. Earlier unavailable values remain blank in the download; they are not zeros.

Synthetic 2/3-period price averages and oscillators; displayed values rounded to six decimals
BarCloseFast EMASlow EMAMACD, price unitsPPO, %
3100.000000101.666667103.333333-1.666667-1.612903
4130.000000120.555556116.6666673.8888893.333333
590.000000100.185185103.333333-3.148148-3.046595
6140.000000126.728395121.6666675.0617284.160325
780.00000095.576132100.833333-5.257202-5.213754
8150.000000131.858711125.4166676.4420445.136513

At bar 3, fast EMA is 101.666667 and slow EMA is 103.333333, giving MACD −1.666667 and PPO −1.612903%. At bar 4, they become 120.555556 and 116.666667: MACD is 3.888889 and PPO is 3.333333%. The first MACD signal is the average of its two available values, 1.111111; its histogram is 2.777778 price units. The first PPO signal is 0.860215%, with a histogram of 2.473118 percentage points.

Normalizing the bar-4 MACD signal instead would produce 100 × 1.111111 / 116.666667 ≈ 0.952381%, which differs from the correctly seeded PPO signal of 0.860215%. This is a reproducible distinction, not a rounding error. Later signals follow their own recursive series and therefore need separate columns.

Multiply the whole history by ten

Make a second fictional series by multiplying every close by 10: 1,000, 1,100, 1,000, 1,300, 900, 1,400, 800 and 1,500. Keep the periods, available bars and seed rule identical. Every price EMA and every MACD line, signal and histogram value multiplies by 10. The numerator and denominator of PPO both multiply by 10, so PPO and its own signal and histogram remain unchanged.

At synthetic bar four, multiplying all price history by ten multiplies MACD by ten while PPO stays at 3.333333 percent.
Original scaling example with identical 2/3/2 periods and seeded histories; no trades or returns are implied.

At bar 4, the second series has fast EMA 1,205.555556 and slow EMA 1,166.666667. MACD is 38.888889 instead of 3.888889, but both PPO readings are 3.333333%. This invariance requires scaling the entire input and initialization consistently. Changing only the latest quote is a different time series, not a unit conversion.

An additive adjustment behaves differently. Adding 100 to every price shifts both EMAs by 100 and leaves their difference unchanged, but changes the PPO denominator. In this fixture, bar-4 PPO would become approximately 1.794872%, not 3.333333%. A back-adjusted contract series, split adjustment or feed transformation must therefore be documented before comparing indicator histories.

Check unavailable and unstable denominators

A zero slow EMA makes the PPO ratio undefined. Do not replace it with zero or an invented small denominator. Near-zero values can magnify the ratio; negative denominators also break the usual positive-price interpretation of its sign. This teaching comparison assumes finite positive closes and a positive slow EMA. Nonpositive-price instruments and adjusted data require a separately declared interpretation rather than automatic reuse of positive-price rules.

Even with positive prices, normalization does not make two instruments equally risky. Their return distributions, gaps, sessions, liquidity, costs and contract multipliers can differ. A matching PPO value is a matching normalized moving-average difference under the stated inputs, not evidence of equal expected performance or synchronized execution.

Download and audit the complete calculation

Download both synthetic series and their calculated columns. The 16-row file retains the early unavailable cells, close, both price EMAs, MACD, its signal and histogram, PPO, its signal and histogram. Numeric values are rounded to 12 decimal places for export; calculate from the supplied closes and seed rule before comparing at a stated tolerance. Do not feed those rounded outputs back into the recursion.

Keep feed identity, price adjustment, timeframe, completed-bar boundary, history start, EMA seed, periods and missing-bar rule in your comparison record. The same 12/26/9 label alone does not prove that two screens use the same series. MetaQuotes' iMACD interface distinguishes the main and signal buffers; inspect the actual buffer and rendering convention before interpreting bars as the line-minus-signal histogram used in this article.

Turn a chart observation into a testable question

In a narrow range, small changes can repeatedly swap the order of two smoothed series. Costs can accumulate even when the chart makes each crossing look orderly. A complete rule specifies whether equality counts, whether decisions wait for bar close, how an opposite crossing is handled and what happens during unavailable quotes.

Use the moving-average crossover guide to distinguish a signal definition from execution. Compare RSI’s bounded construction, and record each proposed rule in a journal before assessing it on unseen data. A rising histogram alone supplies neither a stop price nor evidence that a strategy will remain profitable.

Questions and answers

Can MACD be positive while its histogram is negative?

Yes. The fast average can exceed the slow average while MACD lies below its signal line. Those comparisons use different reference quantities.

Are 12, 26 and 9 the best settings?

They are a common convention, not a universal optimum. Changing settings changes the hypothesis and requires a separate test with costs and unseen data.

What is the difference between PPO and MACD?

MACD is the fast-minus-slow moving-average difference in price units. The PPO convention shown here divides that difference by the slow average and multiplies by 100.

Does multiplying every price by ten change PPO?

With identical periods, available observations and consistently scaled initialization, PPO and its own signal and histogram are unchanged. MACD and its signal and histogram multiply by ten.

Can I calculate the PPO signal by normalizing the current MACD signal?

Generally no. The PPO signal smooths the historical PPO readings, each with its own slow-average denominator. Dividing a smoothed MACD by only the current denominator is a different operation.

What happens when the slow EMA is zero?

PPO is undefined because its denominator is zero. Near-zero or negative denominators also require special interpretation; this worked comparison assumes positive-price inputs.

Are the eight-bar examples trading results?

No. They are synthetic calculation fixtures using deliberately short 2/3/2 periods. No orders, costs, investment returns or tested strategy outcomes are represented.

Why might two platforms show different MACD histograms?

They may plot different buffers, use different signal smoothing, seeds, adjusted prices, missing bars or history lengths. Compare series definitions and input records before treating the difference as an error.

Sources and further checks

Use the current source for your exact instrument, account and platform. Referencing a general specification does not establish support for every TradeCopier workflow.

  1. Fidelity: MACD · Checked September 22, 2026
  2. Fidelity: EMA recursion and initialization · Checked September 22, 2026
  3. StockCharts: Percentage Price Oscillator · Checked September 22, 2026
  4. MetaQuotes: iMACD interface · Checked September 22, 2026

Found an error? Send a correction with this page's address and a primary source. See our editorial standards for how we handle examples, claims and revisions.

Check the product workflow

Use these pages to check TradeCopier settings and connection requirements for your own setup.

Browse all resourcesCurrent resource: /learn/macd

Start Copying Smarter Today

Connect supported accounts with configurable sizing, risk controls, activity logs, and alerts.

Get Started Free