MACD
Indicator
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.
MACD is under zero and under its signal. Downside momentum is building.
MACD -1,290.9 · Signal -1,040.2 · Hist -250.8
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 its signal
The histogram turns positive. Downside momentum is fading.
MACD crosses under its signal
The histogram turns negative after a run higher. Upside momentum is cooling.
Crossing above zero
The 12-bar EMA moves above the 26-bar EMA. The short-term trend has turned up.
Shrinking columns
Columns above zero get shorter bar after bar. The gap is narrowing before any signal cross.
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.
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.
Take the gap
Subtract the 26-bar EMA from the 12-bar EMA. That is the MACD line, in price units.
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.
| Setting | Default | Range | What it changes |
|---|---|---|---|
| Fast length | 12 | 1 to 5,000 | The faster EMA. Shorter makes MACD react sooner and cross its signal more often. |
| Slow length | 26 | 1 to 5,000 | The slower EMA the fast one is measured against. |
| Signal smoothing | 9 | 1 to 5,000 | The EMA applied to MACD for the signal line. |
| Source | Close | Any price, or volume | Which values the EMAs are taken from. |
| Lines | MACD blue #2962FF, Signal orange #FF6D00, 1 px | Any colour and width | Colour and width of each line. |
| Histogram | #26A69A, #B2DFDB, #FFCDD2, #FF5252 | Any colours | Growing 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.
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.
Signal cross
The most common MACD trigger. Many traders take it only in the direction of a slower trend tool.
Zero line as a trend filter
Above zero, the fast EMA is above the slow one. Traders often use it to decide which signal crosses to act on.
Lower high as a warning
A narrowing gap between the averages warns that the advance is slowing. It is caution, not an exit by itself.
MACD mistakesCommon mistakes.
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.
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.
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 indicatorsTry MACD on a live chart.
Free. No download.
Works in your browser and on iPhone too.