Reading the chart
What MACD is
Two exponential averages of the same closing prices, one calculated over a shorter window than the other, sit at slightly different values on almost every bar. MACD plots that distance and nothing else. The slower average is subtracted from the faster one to give a single number per bar, and the panel beneath price draws that number as a line, a smoothed copy of the line, and a bar chart of the gap between the two.
8 min read, Reviewed
What you will be able to do
- State the three components of MACD and how each is calculated
- Explain what a crossing of the MACD line and its signal line describes
- Explain what the histogram measures
- Explain why MACD inherits the lag of the averages it is built from
What is actually plotted
The panel holds three objects, all derived from one price series, and each one sits a further step away from price. The first is the MACD line, and it is a subtraction: the value of a shorter exponential moving average of the closing price, less the value of a longer one, calculated fresh on every bar. The conventional windows are twelve periods and twenty six periods. Both averages are the ones the moving average lesson set out, and no new operation is introduced here. When the shorter average sits above the longer, the subtraction is positive. When it sits below, the subtraction is negative. When the two averages are equal, the MACD line reads zero.
It is worth being exact about what the subtraction throws away. Both inputs are already visible on the price chart, so the MACD line contains no observation the chart did not. What is removed is the price level; what is kept is the distance between two smoothings of that level and which of the two is on top. The panel answers one question, asked once per bar: how far apart are the two averages, and in what order.
The MACD line, on two consecutive bars
- Twelve period exponential average of the close, bar one
- 100.60
- Twenty six period exponential average of the close, bar one
- 100.00
- MACD line, bar one
- 100.60 less 100.00 = 0.60
- Twelve period average, bar two
- 100.90
- Twenty six period average, bar two
- 100.20
- MACD line, bar two
- 100.90 less 100.20 = 0.70
Round illustrative figures, chosen so the arithmetic is legible. The MACD line is carried in the price units of the instrument it is drawn on, which is why the value here is a small number sitting beneath prices near one hundred. No profit or loss is calculated in this block and no cost applies to it.
Key term
- MACD
- MACD tracks the distance between two exponential moving averages of the same price series, plotting that distance, a smoothed version of it, and the gap between the two.
The second line is an average of the first
The signal line is an exponential moving average of the MACD line itself, conventionally over nine periods. Its input is not price. Its input is the difference series produced by the subtraction above, which means the signal line is a smoothing of a smoothed difference between two smoothings. Its name is a piece of inherited vocabulary describing the role it played in the original construction, and it is not an instruction: nothing in the arithmetic of an average of an average tells anybody to do anything.
The update rule is the one already established for an exponential average. Each new value is the previous value plus a smoothing constant multiplied by the distance between the newest input and that previous value, where the constant is two divided by one more than the number of periods. A nine period average therefore moves one fifth of the way toward each new reading and keeps four fifths of where it already was, which is why it trails the series it is built on rather than tracking it.
The signal line, updated across three bars
- Smoothing constant for a nine period exponential average
- 2 ÷ (9 + 1) = 0.20
- Signal line, previous bar
- 0.50
- MACD line, bar one
- 1.00
- Signal line, bar one
- 0.50 + 0.20 × (1.00 less 0.50) = 0.60
- MACD line, bar two
- 1.10
- Signal line, bar two
- 0.60 + 0.20 × (1.10 less 0.60) = 0.70
- MACD line, bar three
- 1.20
- Signal line, bar three
- 0.70 + 0.20 × (1.20 less 0.70) = 0.80
Round illustrative figures. The MACD line rises by one tenth on every bar in this block, and the signal line settles four tenths behind it and stays exactly four tenths behind. No profit or loss is calculated in this block and no cost applies to it.
Key term
- Exponential moving average (EMA)
- An exponential moving average smooths a price series while weighting recent observations more heavily than older ones, so it turns faster than a simple average of the same length.
That constant gap in the last three rows is the property worth carrying forward. When the MACD line climbs at a steady rate, the distance between it and its own average stops changing, because the average is climbing at the same rate one step behind. The gap widens only when the MACD line accelerates and narrows whenever it decelerates, including while it is still rising. A steady, uninterrupted move therefore does not produce a widening separation between the two lines, and a narrowing separation does not require the MACD line to have turned down.
The histogram is the gap, drawn
The histogram is the MACD line minus the signal line, plotted as a bar per period above and below a zero axis. It introduces no third input. Its height on any bar is the vertical distance already visible between the two lines, redrawn so that a separation of a few hundredths becomes a bar with a readable length and an unambiguous sign.
Because the histogram is defined as that difference, the bar on which the histogram crosses zero is necessarily the bar on which the two lines cross each other. They are not two events, one of which precedes the other. They are one event stated twice, and any description that treats a histogram sign change as an earlier or independent occurrence has misread the definition.
The histogram, and the bar on which the lines cross
- Histogram, by definition
- MACD line less signal line
- Bar one, MACD line and signal line
- 1.20 and 0.80
- Bar one histogram
- 1.20 less 0.80 = 0.40
- Bar two, MACD line falls to
- 0.80
- Bar two signal line
- 0.80 + 0.20 × (0.80 less 0.80) = 0.80
- Bar two histogram
- 0.80 less 0.80 = 0.00
- Bar three, MACD line falls to
- 0.30
- Bar three signal line
- 0.80 + 0.20 × (0.30 less 0.80) = 0.70
- Bar three histogram
- 0.30 less 0.70 = negative 0.40
Round illustrative figures, using the same nine period smoothing constant as the previous block. The histogram changes sign between bar two and bar three, which is the same bar on which the MACD line passes below the signal line, because the histogram is that difference and not a separate measurement. No profit or loss is calculated in this block and no cost applies to it.
Key term
- Oscillator
- An oscillator is an indicator that moves within fixed limits or around a centre line, describing how fast and how far price has moved recently rather than which way the trend runs.
One further reading follows from the section above. Since the signal line is a trailing copy of the MACD line, the distance between them is large when the MACD line is moving quickly relative to its own recent values and small when it is level. A shrinking histogram therefore describes a MACD line whose rate of change is falling, which is a statement about the rate of change of a difference between two averages of past closing prices, three arithmetic steps away from a price anybody traded at.
What a crossing describes
A crossing of the MACD line and its signal line describes one thing, and the description is entirely backward looking. The gap between the shorter and longer averages has moved to the other side of its own recent average. Nothing about price is asserted by that sentence, and nothing about the next bar is contained in it. The gap on this bar has become larger, or smaller, than the smoothed version of what the gap has recently been.
The indicator's name records a second construction that is often confused with the first. Convergence and divergence in the name refer to the two moving averages coming together and moving apart, which is exactly what the MACD line measures: near zero the averages are converging, and far from zero in either direction they have diverged. A crossing of the zero line by the MACD line therefore records that the shorter average has passed through the longer one, which is the moving average crossover of an earlier lesson restated in a second panel rather than a new finding.
Key term
- Moving average
- A moving average is the average of a fixed number of recent prices, recalculated on every new bar, which smooths a price series by lagging it.
Key term
- Divergence
- Divergence is the case where price makes a further extreme and an indicator computed from that price does not, which technical traditions read as a weakening of the move rather than as a signal to act.
Momentum traditions conventionally label a crossing of the MACD line above its signal line bullish and a crossing below it bearish, and those labels are names for the sign of a subtraction rather than findings about an instrument. The same traditions disagree about what, if anything, follows a crossing, and about whether crossings occurring while the MACD line is on the far side of zero from the crossing direction should be counted at all. A convention that has to be filtered by a second condition before its adherents will report it is a convention whose unfiltered form its own adherents do not trust.
Why the lag is inherited, and doubled
An exponential moving average is a weighted sum of prices that have already printed, heaviest on the most recent and progressively lighter running back through the series. Subtracting one such weighted sum from another leaves a weighted sum of past prices, so the MACD line is a lagging construction in the strict sense set out in the leading and lagging lesson: every term in it is a price already known. Taking a further exponential average of that line applies a second round of the same smoothing, which is why a crossing arrives later than a change in the MACD line, which itself arrives later than a change in price.
The consequence is easiest to see when price is held still. The averages carry on moving after price stops, because each of them is still working through prices from earlier bars, and they are working through them at different rates. The block below fixes price after a single step and lets the arithmetic run.
Price steps once and never moves again, and the crossing still arrives
- Closing price, bars one to five
- 110.00 on bar one, unchanged at 110.00 on every later bar
- Both averages before the step
- 100.00
- Faster average, smoothing 0.50, bars one to five
- 105.00, 107.50, 108.75, 109.38, 109.69
- Slower average, smoothing 0.20, bars one to five
- 102.00, 103.60, 104.88, 105.90, 106.72
- MACD line, faster less slower
- 3.00, 3.90, 3.87, 3.48, 2.97
- Signal line, smoothing 0.50 of the MACD line
- 1.50, 2.70, 3.29, 3.38, 3.17
- Histogram, MACD line less signal line
- 1.50, 1.20, 0.58, 0.10, negative 0.20
- Last bar on which price moved
- bar 1
- Last bar on which the MACD line rose
- bar 2
- Bar on which the histogram turns negative
- bar 5
Round illustrative figures, and the smoothing constants here are chosen to keep the arithmetic legible rather than to reproduce the conventional twelve, twenty six and nine settings. Values are rounded to two decimal places at each step. No profit or loss is calculated in this block and no cost applies to it.
Read the last three rows together. Price moved on one bar and was then identical on every bar that followed, so after the first bar there is nothing in the market to describe. The MACD line nevertheless peaks two bars later, falls for the rest of the sequence, and drives the histogram through zero on the fifth bar, which is a bar on which no price changed at all. The crossing is real arithmetic performed correctly on real data. It is simply an event in the calculation catching up with an old move rather than a report of a new one.
The scale, and what cannot be compared
MACD is carried in the price units of the instrument it is drawn on, and it is unbounded in both directions. That is the structural difference between it and the bounded oscillator of the previous lesson, whose readings are confined between nought and one hundred by construction. An unbounded reading has no natural ceiling or floor, so there is no level at which it is far from anything, and the vocabulary attached to bounded readings has no counterpart here.
Three comparisons therefore fail. Two instruments cannot be compared on the same MACD value, because the two are denominated in different price units and their averages separate by different amounts for the same proportional move. Two timeframes cannot be compared, because a period is a different quantity of time on each. And an instrument cannot be compared with its own history from a period when it traded at a very different price, because the gap between two averages scales with the level around which they are calculated. Some platforms address this by plotting the difference as a percentage of the slower average, which produces a comparable series and a different indicator carrying the same name.
Where practitioners disagree
The first argument is about the settings, and it has run for as long as the indicator has existed. Twelve, twenty six and nine are inherited from the original publication in the late nineteen seventies, when a trading week had a different shape and the periods corresponded to spans of calendar time that they no longer correspond to. One camp treats them as arbitrary numbers that ought to be fitted to the instrument and the timeframe in front of the chartist. The other replies that any setting fitted to past data is a setting chosen because it described history well, which is not a property that transfers, and that the sole merit of the defaults, that a great many people are looking at them, is the only merit available. Neither position has displaced the other, and charting software ships the defaults while offering the inputs.
The second concerns the word divergence in its other sense. Practitioners use it not only for two averages separating, which is what the indicator's name means, but for a chart on which price prints a higher high while the MACD line prints a lower one. The two senses share a word and share nothing else. The structural objection to the second is contained in the earlier section on the constant gap: the MACD line measures the separation between two averages, and that separation narrows whenever a move decelerates, including in moves that continue for a long time afterwards. Lower peaks alongside higher price highs are therefore a common feature of extended moves rather than an unusual one, and anyone counting occurrences will find many that were followed by continuation and many that were not. This page reports no figure for either count, because no verified figure exists for it.
The third is narrower. Some traditions read the histogram's turn, the bar on which it stops growing and starts to shrink, as an event in its own right. Unlike a histogram sign change, which is arithmetically identical to a crossing, a turn genuinely is a different event and occurs earlier, because a gap starts narrowing before it closes. Reading it accepts more events per span of chart in exchange for reading them sooner, which is the same trade every filter in this module has made, and it is a trade rather than an improvement: the events that arrive sooner include the ones that reverse in the following bars.
What survives all three arguments is small and worth stating plainly. MACD is a subtraction between two averages of past closing prices, a further average of that subtraction, and the difference between those two drawn as bars. Everything a reader can see in the panel is a rearrangement of prices already visible on the chart above it, and the rearrangement adds no observation that the chart did not already contain.
In summary
- MACD has three components and one input. The MACD line is a shorter exponential average of the closing price less a longer one, conventionally twelve periods less twenty six. The signal line is an exponential average of that line, conventionally over nine periods. The histogram is the first minus the second.
- A crossing of the two lines describes the gap between the two price averages moving to the other side of its own recent average. The histogram crosses zero on exactly that bar, because the histogram is that difference, so the two are one event described twice.
- Every term in the calculation is a price that has already printed, and the signal line applies a second round of smoothing to a series that was already smoothed. A worked block on this page holds price completely still after a single step and the arithmetic still produces a peak two bars later and a sign change on the fifth.
- The reading is carried in the instrument's own price units and is unbounded, so it cannot be compared across instruments, across timeframes, or against its own history from a period when the instrument traded at a different level.
Get started
Open your account in four steps.
A clear path from sign-up to your first trade, in four steps.
No depositNo documents
01/ 04step 1 of 4
Register
A few details to get started.
No deposit to open
02/ 04step 2 of 4
Verify
Confirm your identity, securely.
ID and proof of address
03/ 04step 3 of 4
Fund
Add money by bank transfer or card.
From $0
04/ 04step 4 of 4
Trade
Go live on the platform you already know.
MetaTrader 5



