Moving Average Convergence Divergence (MACD)

MACD
Indicator

MomentumSeparate panelFree on ChartLabs

MACD is the gap between a 12-bar and a 26-bar EMA of the close, with a 9-bar signal line and a histogram of the difference between the two.

Created by Gerald Appel, late 1970s. Reviewed by the ChartLabs team, updated Nov 2026.

Example market1hIndicatorsAtlas AIMACDchartlabs.co/charts
Atlas reads it

MACD is under zero and under its signal. Downside momentum is building.

MACD -1,290.9 · Signal -1,040.2 · Hist -250.8

Atlas reads it

MACD is under zero and under its signal. Downside momentum is building.

MACD -1,290.9 · Signal -1,040.2 · Hist -250.8

Illustration on simulated data.

Moving Average Convergence Divergence (MACD)What is the MACD indicator?

MACD draws in its own panel: the blue MACD line, the orange Signal line, and a Histogram of columns around a dashed grey zero line.

The MACD line is the 12-bar EMA of the close minus the 26-bar EMA. When the faster average is above the slower one, MACD is positive; when it is below, negative. The signal line is a 9-bar EMA of the MACD line, and each histogram column is MACD minus signal.

The columns change shade as they grow or shrink: strong teal while a column above zero grows, pale teal while it shrinks, pale pink while a column below zero rises toward zero and strong red while it falls. MACD is in price units, so its numbers depend on the market's price.

MACD or PPO?

The two have the same shape on one chart. MACD is in price units; PPO divides the gap by the slow EMA, so it reads in percent and compares across markets.

When the first values appear

Each EMA starts from the simple average of its first inputs, so MACD needs 26 closes and the signal and histogram 8 more.

MACD signalsFive patterns to know.

MACD crosses above the signal
1Bullish lean

MACD crosses above its signal

The histogram turns positive. Downside momentum is fading.

MACD crosses under the signal
2Bearish lean

MACD crosses under its signal

The histogram turns negative after a run higher. Upside momentum is cooling.

MACD crosses above zero
3Bullish

Crossing above zero

The 12-bar EMA moves above the 26-bar EMA. The short-term trend has turned up.

Columns shrink: the gap narrows
4Inconclusive

Shrinking columns

Columns above zero get shorter bar after bar. The gap is narrowing before any signal cross.

Higher highLower high
5Bearish lean

Lower high in a rising market

Price makes a higher high but MACD makes a lower one. The averages are drawing closer.

MACD formulaHow it is calculated.

MACD=EMA12−EMA26Signal=EMA9(MACD)Histogram=MACD−Signal
STEP 1

Two EMAs of the close

Take a 12-bar and a 26-bar EMA of the close. Each starts from the simple average of its first 12 or 26 closes.

STEP 2

Take the gap

Subtract the 26-bar EMA from the 12-bar EMA. That is the MACD line, in price units.

STEP 3

Add the signal and histogram

The signal is a 9-bar EMA of MACD. Each histogram column is MACD minus the signal.

MACD settingsEvery setting, explained.

SettingDefaultRangeWhat it changes
Fast length121 to 5,000The faster EMA. Shorter makes MACD react sooner and cross its signal more often.
Slow length261 to 5,000The slower EMA the fast one is measured against.
Signal smoothing91 to 5,000The EMA applied to MACD for the signal line.
SourceCloseAny price, or volumeWhich values the EMAs are taken from.
LinesMACD blue #2962FF, Signal orange #FF6D00, 1 pxAny colour and widthColour and width of each line.
Histogram#26A69A, #B2DFDB, #FFCDD2, #FF5252Any coloursGrowing and shrinking columns above zero, then rising and falling columns below it. A dashed grey zero line sits behind them.
Setting
Fast length
Default
12
Range
1 to 5,000
What it changes
The faster EMA. Shorter makes MACD react sooner and cross its signal more often.
Setting
Slow length
Default
26
Range
1 to 5,000
What it changes
The slower EMA the fast one is measured against.
Setting
Signal smoothing
Default
9
Range
1 to 5,000
What it changes
The EMA applied to MACD for the signal line.
Setting
Source
Default
Close
Range
Any price, or volume
What it changes
Which values the EMAs are taken from.
Setting
Lines
Default
MACD blue #2962FF, Signal orange #FF6D00, 1 px
Range
Any colour and width
What it changes
Colour and width of each line.
Setting
Histogram
Default
#26A69A, #B2DFDB, #FFCDD2, #FF5252
Range
Any colours
What it changes
Growing and shrinking columns above zero, then rising and falling columns below it. A dashed grey zero line sits behind them.
126 signal crosses in view
070,20866,82563,44360,06164,803.7

Drag to see how the setting changes the lines and how many signals you get. Illustration on simulated data.

MACD strategiesUse it in 3 setups.

MACD crosses above the signal

Signal cross

IfMACDcrosses aboveSignalexit whenit crosses back

The most common MACD trigger. Many traders take it only in the direction of a slower trend tool.

MACD crosses above zero

Zero line as a trend filter

Only long whileMACDis above0

Above zero, the fast EMA is above the slow one. Traders often use it to decide which signal crosses to act on.

Higher highLower high

Lower high as a warning

Ifprice makes a new highandMACDa lower highthentighten the stop

A narrowing gap between the averages warns that the advance is slowing. It is caution, not an exit by itself.

Test a rule in the Strategy TesterFree with 1 year of history. Past results do not guarantee future results.

MACD mistakesCommon mistakes.

MACD crosses above the signal

Buying every cross under zero

A cross up while MACD is still under zero often comes while price is still falling. The trend can carry on for a while before the averages meet.

Above zero for 30 bars

Reading a high MACD as overbought

MACD has no upper limit. A high reading shows a wide gap between the averages, and strong trends can keep it wide.

Columns shrink: the gap narrows

Treating shrinking columns as a reversal

Columns shrink whenever momentum slows, including pauses inside a trend. Price can keep going while they shrink.

MACD combinationsPair it with these.

MACD FAQQuestions traders ask.

What are the default MACD settings?

Fast length 12, slow length 26 and signal smoothing 9, on the close. These are the lengths most platforms use.

What does the MACD histogram show?

Each column is MACD minus its signal line. Columns above zero mean MACD is above the signal; shrinking columns mean the two lines are getting closer.

What does MACD above zero mean?

The 12-bar EMA is above the 26-bar EMA, so the short-term average is higher than the longer one.

Why does MACD start later than the chart?

Each EMA starts from the simple average of its first inputs. MACD needs 26 closes, and the signal and histogram need 8 more.

Why are my MACD numbers so different on two markets?

MACD is in price units. A coin priced in tens of thousands has a much larger MACD than a stock priced at 20. Use PPO to compare in percent.

Is MACD leading or lagging?

Lagging. It is built from moving averages of past closes, so its crosses come after price has turned.

What is the best timeframe for MACD?

It works on any timeframe. Hourly and daily charts give fewer crosses than one-minute charts, where the lines cross often.

Does MACD work on crypto, forex and stocks?

The calculation is the same on every market. Only the size of the numbers changes, because MACD follows the market's price.

Does MACD repaint?

No. Values on closed bars never change. The live bar moves until it closes.

Who created MACD?

Gerald Appel developed MACD in the late 1970s. The histogram was added later by Thomas Aspray.

Related indicatorsMore momentum tools.

All momentum indicators

Try MACD on a live chart.
Free. No download.

Works in your browser and on iPhone too.

Example market1h
MACD (12, 26, 9)