What is MACD
MACD stands for Moving Average Convergence Divergence. It is a momentum indicator drawn in a separate window below the price chart. It compares a fast exponential moving average (EMA) with a slow EMA and shows how far apart they are.
An EMA is an average of recent prices that gives more weight to the latest candles. For the basics, see the EMA indicator page.
- When the fast EMA pulls away above the slow EMA, recent prices are rising faster than older ones and MACD climbs.
- When the fast EMA drops below the slow EMA, MACD falls.
- When the EMAs come together (converge), MACD moves back toward its centre line.
MACD is built from moving averages, so it is a lagging indicator. It describes what price has already done. It does not predict what price will do. See leading vs lagging indicators.
Ready to try it on a real or demo account?
Partner link · trading carries a high risk of loss
The formula
MACD has three parts:
| Component | Calculation | What it shows |
|---|---|---|
| MACD line | Fast EMA of price minus slow EMA of price | Distance between short-term and longer-term average |
| Signal line | Average of the MACD line over the signal period | A smoothed version of the MACD line |
| Histogram | MACD line minus signal line | Whether the MACD line is speeding up or slowing down relative to its own average |
The centre line is where the fast and slow EMAs are equal. Above it, the fast EMA is higher than the slow EMA. Below it, the fast EMA is lower.
MACD values are in price units, not a fixed scale. A reading on a currency pair cannot be compared directly with a reading on gold or an index. This is one reason MACD has no universal "overbought" or "oversold" level, unlike the RSI indicator.
MACD settings
MACD has three inputs: a fast EMA period, a slow EMA period and a signal period. Every platform loads a standard default set that comes from the indicator's original design. You can see these values in the settings window when you add MACD to a chart.
How changing them affects the indicator:
- Shorter periods make MACD react sooner to price changes. They also produce more crossings that reverse quickly.
- Longer periods smooth out noise and produce fewer crossings, but those crossings come later.
- A shorter signal period keeps the signal line close to the MACD line, so the histogram changes sign more often.
Changing the settings does not make MACD more accurate. It only trades speed against noise. If you fit the periods so they look perfect on past charts, they will usually perform worse on new data. Keeping the defaults has one practical benefit: your readings match what most other chart users see.
How to add MACD in MT4 and MT5
In both MetaTrader 4 and MetaTrader 5:
- Open a chart.
- Go to Insert → Indicators → Oscillators → MACD, or find it in the Navigator window and drag it onto the chart.
- In the settings window, check the Fast EMA, Slow EMA and signal (MACD SMA) fields, and choose which price to apply it to.
- Click OK. MACD appears in a sub-window below the chart.
Two details are specific to MetaTrader's built-in version:
- It draws the MACD line as histogram bars and the signal as a dotted line. Many other charting tools draw the MACD line as a line and add a separate histogram of MACD minus signal. The bars in MetaTrader are therefore not the same thing as the "histogram" in most textbooks.
- Its signal line is a simple moving average of MACD, not an exponential one. Values will differ slightly from charts that use an EMA signal.
If you want the classic three-part layout, it is available as a custom indicator. Only install custom indicators from sources you trust. The MetaTrader platforms page covers how the platforms work in general.
How to read MACD: a drawn example
The sketch below is a made-up example. It is not a real market.
Here is what each part shows:
- Above or below the centre line. Above means the fast EMA is above the slow EMA, so recent momentum has been upward. Below means the opposite.
- Crossing of MACD and signal. This shows that momentum has started to change direction relative to its recent average.
- Histogram shrinking. The gap between MACD and signal is narrowing. Momentum is fading, even if price is still moving the same way.
- Divergence. In the sketch, price makes a higher high while MACD makes a lower high. This means the second push up had less momentum behind it. Divergence describes weakening momentum. It is not a timing signal, and price can keep going for a long time after it appears. See divergence trading.
Typical uses in a MACD strategy
Traders usually treat MACD as one input among several:
- Trend context. Readings that stay on one side of the centre line agree with the trend shown by market structure.
- Momentum check on pullbacks. The histogram fading during a pullback shows that the counter-move is losing strength.
- Filtering with higher timeframes. Reading MACD on a higher timeframe before looking at a lower one. See multiple timeframe analysis.
- Combining with levels. Looking at MACD only near support and resistance, not on every candle.
None of these is a complete system. Test any idea on a demo account and against your own risk management rules first.
Where MACD misleads
- Sideways markets. When the EMAs move flat and close together, MACD crosses its signal line again and again with no follow-through.
- Lag at turns. By the time the MACD line crosses the centre line, a large part of the move may already be over.
- Divergence in strong trends. Momentum can fade while price keeps trending. Repeated divergences can appear before any turn happens, or no turn may come at all.
- Gaps and news spikes. A single large candle distorts the EMAs. MACD then shows a sharp reading that says more about one event than about the trend.
- Unfinished candle. On the current, still-open candle, MACD changes with every tick. A crossing you see mid-candle can disappear by the close. Read MACD on closed candles.
- Scale comparisons. A large MACD value on one instrument is not "stronger" than a small value on another, because the units differ.
Leveraged forex and CFD trading can lose money fast. No indicator setting removes that risk.
Frequent questions
What is MACD in simple words?
It shows the gap between a fast and a slow moving average of price. The gap tells you whether recent momentum is rising or falling.
What are the best MACD settings?
No setting is best. The defaults are the most widely used. Shorter periods react faster but give more noise, and longer periods are smoother but slower.
Why does MACD look different in MetaTrader?
MetaTrader draws the MACD line as bars and uses a simple moving average for the signal line. Many other tools draw a line plus a separate histogram and use an exponential signal.
Is MACD a leading indicator?
No. It is built from moving averages, so it lags price.
Can MACD be used alone?
It is usually combined with price structure, levels and risk rules. On its own, it gives frequent misleading readings in sideways markets.
