Forex Trading13 min read

MACD Forex Guide: MACD Indicator Settings (12, 26, 9) and Use

MACD forex guide: what the default 12, 26, 9 settings mean, the MACD indicator formula with a worked example, signal line, histogram, divergence and limits.

Last Updated: 2026-11-16
MACD Forex Guide: MACD Indicator Settings (12, 26, 9) and Use

This site contains affiliate links. We may earn a commission if you sign up through our links. How we research

Short answer: the MACD indicator (full form: Moving Average Convergence Divergence) is used in forex to read trend momentum. It subtracts a 26-period exponential moving average (EMA) from a 12-period EMA to show momentum, then smooths that line with a 9-period moving average called the signal line. The default MACD indicator settings are 12, 26, 9. In forex, traders read three things: the MACD line crossing the signal line (momentum shift), the MACD line crossing zero (the 12 EMA crossing the 26 EMA) and the histogram (the gap between the two lines). MACD lags price, so it works best as a filter on top of market structure, not as a stand-alone entry signal.

Disclosure: OnForex earns a referral commission if you open an Exness account through our links.

Try a free Exness demo account

Test MACD crossovers and divergence on live charts with virtual funds before you risk real money. Forex and CFD trading carries a high risk of loss.

Try a free Exness demo account

Forex and CFD trading involves significant risk. You may lose your invested capital.

MACD full form: what does MACD stand for?

MACD stands for Moving Average Convergence Divergence. "Convergence" means the fast and slow moving averages moving towards each other; "divergence" means them moving apart. The indicator plots that distance, so it shows whether trend momentum is building or fading.

QuestionShort answer
MACD indicator full formMoving Average Convergence Divergence
Default MACD settings12 (fast EMA), 26 (slow EMA), 9 (signal line)
MACD formulaMACD = EMA(12) of the close - EMA(26) of the close; signal = 9-period average of the MACD line; histogram = MACD - signal
Where it is plottedIn a separate window under the price chart, oscillating around a zero line

What is the MACD indicator?

MACD was developed by Gerald Appel in the late 1970s. It is both a trend-following and a momentum indicator, and it is built into MT4, MT5 and every major charting platform. It has three parts:

PartFormulaWhat it shows
MACD lineEMA(12) − EMA(26) of the closeDistance between the fast and slow trend; above 0 means the fast EMA is above the slow EMA
Signal line9-period moving average of the MACD line (EMA on most charting sites, SMA in MT4 and MT5)A smoothed version of the MACD line, used for crossovers
HistogramMACD line − signal lineHow fast momentum is changing; bars flip sign when the lines cross

What do the default MACD settings 12, 26, 9 mean?

The three numbers are periods, counted in candles of the timeframe you are viewing (not days):

  • 12: the fast EMA, which reacts quickly to recent closes.
  • 26: the slow EMA, which reacts more slowly and shows the longer trend.
  • 9: the length of the EMA applied to the MACD line to make the signal line.

On a daily chart, 12 candles are about two and a half trading weeks (five days each) and 26 candles about five weeks; the 9 smooths the difference between them. The combination is the standard default on most platforms; there is no proof that it is the best setting for every pair or timeframe (see the settings table below).

MACD formula and a worked numeric example

Check your platform's signal line. MetaQuotes' documentation for MetaTrader 4 and MetaTrader 5 (read on 16 November 2026) gives the built-in indicator as MACD = EMA(close, 12) - EMA(close, 26) and SIGNAL = SMA(MACD, 9), so the signal line there is a simple moving average. Many web charting platforms use an EMA for the signal line instead, which is what the worked example below uses. Crossover timing can differ slightly between the two, and the built-in MetaTrader indicator draws its bars and lines in its own style, so check what the bars on your chart represent before you apply the rules on this page.

An EMA gives more weight to recent prices. Each new value is:

EMA(new) = EMA(previous) + α × (close − EMA(previous)), where α = 2 ÷ (period + 1).

For the 12-period EMA α = 2 ÷ 13 = 0.1538. For the 26-period EMA α = 2 ÷ 27 = 0.0741. For the 9-period signal EMA α = 2 ÷ 10 = 0.2. (With an SMA signal line you would instead average the last nine MACD values.)

Worked example on EUR/USD, one candle at a time (illustrative numbers, not real market data):

StepPrevious candleThis candle
Close1.08525
EMA(12)1.084001.08400 + 0.1538 × (1.08525 − 1.08400) = 1.08419
EMA(26)1.083451.08345 + 0.0741 × (1.08525 − 1.08345) = 1.08358
MACD line1.08400 − 1.08345 = 0.000551.08419 − 1.08358 = 0.00061 (6.1 pips)
Signal line0.000580.00058 + 0.2 × (0.00061 − 0.00058) = 0.00059
Histogram0.00055 − 0.00058 = −0.000030.00061 − 0.00059 = +0.00002

On the previous candle the MACD line was below the signal line (histogram −0.00003). On this candle it is above (histogram +0.00002). That flip is a bullish signal-line crossover. The MACD line is still above zero, which means the 12 EMA is above the 26 EMA and the broader momentum is up. Your platform does this calculation for you; the example shows why the histogram is so small near a crossover and why the indicator reacts after price has already moved.

How to use the MACD indicator, step by step

  1. Add it to the chart. In MT4 or MT5: Insert > Indicators > Oscillators > Moving Average Convergence/Divergence. Keep 12, 26, 9.
  2. Read the context first. Is the MACD line above or below zero? Above zero favours buys, below zero favours sells.
  3. Wait for a signal-line crossover in the direction of that context. For example a bullish crossover while price is in an uptrend and pulling back.
  4. Check price structure. Is price at a level that makes sense (support, resistance, order block, fair value gap)? A crossover in the middle of nowhere is a weak signal.
  5. Place the stop-loss from structure, not from MACD, and size the position from the stop distance. See position sizing.
  6. Exit by plan: a fixed reward-to-risk target, the next level, or an opposite crossover on your trading timeframe.

Core MACD signals

Signal-line crossover

  • Bullish: MACD line crosses above the signal line.
  • Bearish: MACD line crosses below the signal line.

This is the most frequent signal and the noisiest. In a range, MACD crosses back and forth around zero and most crossovers fail. In a trend, crossovers that happen in the trend's direction after a pullback are more useful than counter-trend ones.

Zero-line crossover

When the MACD line crosses zero, the 12 EMA and 26 EMA have crossed. It happens less often than a signal-line crossover and confirms a medium-term change of direction, but it comes late, after a good part of the move is done. Many traders use it as a bias filter: above zero look for buys, below zero look for sells.

Histogram

Growing bars mean momentum is accelerating in that direction; shrinking bars mean it is fading. The histogram turns before the lines cross, so it gives the earliest warning, and also the most false alarms.

HistogramReading
Above 0 and growingBullish momentum accelerating
Above 0 and shrinkingBullish momentum fading; a bearish crossover may follow
Below 0 and growing (more negative)Bearish momentum accelerating
Below 0 and shrinkingBearish momentum fading; a bullish crossover may follow

MACD divergence

Divergence means price and MACD disagree.

  • Regular bullish divergence: price makes a lower low, MACD (or the histogram) makes a higher low. Selling momentum is weaker on the second low.
  • Regular bearish divergence: price makes a higher high, MACD makes a lower high.
  • Hidden bullish divergence: price makes a higher low in an uptrend while MACD makes a lower low. It suggests the pullback is ending and the trend may continue. Hidden bearish divergence is the mirror image in a downtrend.

Illustrative example: EUR/USD falls to 1.0900 with MACD at −0.0030, bounces, then falls to 1.0850 with MACD at only −0.0015. Price is lower but momentum is less negative, which is bullish divergence. Divergence is a warning, not an entry: it can persist for many candles while price keeps trending. Wait for confirmation such as a break of structure or a crossover.

Combine MACD with market structure (BOS and MSS)

MACD is derived from past closes, so it tells you about momentum, not about where price may react. Pair it with structure:

  • Trend context: use a break of structure (BOS) in the trend direction, or a market structure shift (MSS) for a possible reversal, to decide the bias. Only take MACD crossovers that agree with it.
  • Location: look for buys in the discount half of the current dealing range (below equilibrium) and sells in the premium half. A bullish crossover at a demand zone or order block, after a liquidity sweep of a recent low, is a stronger setup than a crossover in the middle of the range.
  • Divergence at a sweep: bearish divergence on a sweep of buy-side liquidity above equal highs, followed by an MSS to the downside, is a common reversal pattern that traders watch. It is a pattern, not a guarantee.

Example plan (illustrative, not a recommendation): H4 uptrend with a recent BOS up; price retraces into the discount zone and sweeps a previous low; on M15 the MACD line crosses above the signal line while below zero and price closes back above the swept low. Stop below the sweep wick, target the previous high, size the position for 1% risk. Test this on a demo account and record at least 30 to 50 trades before drawing conclusions. See risk management and price action.

Three simple MACD strategies

1. Crossover with a trend filter

  1. Add a 200-period EMA. Only take buys when price is above it and sells when price is below.
  2. In an uptrend, wait for a pullback that pushes MACD below zero, then a bullish crossover.
  3. Enter on the next candle. Stop below the pullback low.
  4. Exit at a fixed multiple of the risk or at the opposite crossover.

2. Divergence at support or resistance

  1. Mark horizontal support and resistance on H4 or daily.
  2. Wait for price to reach the level and form divergence.
  3. Enter after a crossover or a reversal candle. Stop beyond the level, target the next level.

3. Histogram turn

  1. In an uptrend with MACD above zero, wait for a pullback where the histogram is negative.
  2. When the bars shrink and the histogram turns positive, enter in the trend direction.
  3. Stop below the pullback low. It is earlier than waiting for a crossover, with more false signals.

MACD settings and timeframes

SettingEffectTypical use
12-26-9Standard, balancedAll timeframes
8-21-5Faster, more signalsActive day trading
5-13-4Much faster, noisyShort-term charts
24-52-18Slower, fewer signalsDaily and weekly charts
TimeframeSignal quality
M5-M15Many crossovers, mostly noise; costs matter
H1Moderate frequency
H4Fewer, cleaner signals
DailyFew signals, slow

Changing the settings does not remove lag; it only trades lag against noise. A common multi-timeframe approach is to read the bias on the daily or H4 MACD and take entries on a lower timeframe in that direction.

Limitations and common MACD mistakes

  • It lags. MACD is calculated from past closes. Crossovers confirm a move that has already started.
  • Range markets generate false signals. Use a trend filter or skip the trade when price is flat.
  • No fixed levels. Unlike RSI, MACD has no overbought or oversold zone, and its values depend on the pair's price and volatility, so they cannot be compared between pairs.
  • Divergence is not a reversal signal on its own. Strong trends can show divergence for a long time.
  • Treating every crossover as a trade. Add a rule about structure and location, and a stop-loss before you enter.
  • Using MACD alone. Combine it with structure, support and resistance and risk rules. Compare it with the RSI guide and moving averages.

Check Exness account conditions

Continue to Exness to see the account types, platforms (MT4, MT5 and the web terminal) and demo options in your country. Forex and CFD trading carries a high risk of loss.

Continue to Exness

Forex and CFD trading involves significant risk. You may lose your invested capital.

Frequently Asked Questions

What is the MACD indicator?

MACD stands for Moving Average Convergence Divergence. It is a momentum indicator built from two EMAs: the MACD line is the 12-period EMA minus the 26-period EMA, the signal line is a 9-period moving average of that line, and the histogram is the difference between them.

How do you use the MACD indicator in forex?

Use the zero line for bias, take signal-line crossovers in the direction of that bias, and confirm with price structure such as a break of structure or a level. Set a stop-loss from structure and size the trade from the stop distance.

What are the best MACD settings for forex?

12, 26, 9 is the standard default (fast EMA, slow EMA, signal length) and a reasonable starting point. Faster settings such as 8-21-5 give more signals and more noise; slower settings give fewer. No setting is best for every pair or timeframe, so test on a demo account.

Is MACD a leading or lagging indicator?

It lags, because it is calculated from past closing prices. The histogram turns slightly earlier than the crossover, but it is still based on past data.

How do you read the MACD histogram?

Bars above zero mean the MACD line is above the signal line; bars below zero mean it is below. Growing bars show accelerating momentum and shrinking bars show fading momentum.

Why does MACD give false signals?

In sideways markets the EMAs keep crossing, so MACD produces many crossovers with no follow-through. Filtering with trend direction, higher-timeframe bias and price levels reduces them but does not remove them.

Does MACD work for scalping?

It can be used on M1 to M15, but costs and noise are higher there. If you scalp, check spreads and commissions first and see scalping strategy.

Risk warning: Forex and CFD trading involves a high risk of loss. This article is for education only and is not investment advice. Indicator behaviour in the past does not guarantee future results.

Further Reading

Related Articles

Forex Trading2026-11-01

RSI Indicator: Settings, Strategies and What Our Data Shows

RSI indicator guide: Wilder's formula, the 14 setting, overbought and oversold levels and divergence, with tests on four markets of what RSI can do.

Read More3 min
Forex Trading2026-11-01

Moving Averages in Forex: SMA, EMA, 200-Day Data

Moving averages in forex: SMA vs EMA formulas, 50/200 golden and death crosses, common periods, and what 9 years of daily data show about the 200-day line.

Read More2 min
Forex Trading2026-10-31

ATR Indicator: Formula, Settings and ATR Stop-Loss in Forex

ATR explained: how Average True Range is calculated with a worked example, the 14-period setting, ATR stops, position sizing and our stop-hit data.

Read More3 min
Forex Trading2026-11-01

ADX Indicator: Settings, +DI/-DI and What Our Data Shows

ADX indicator guide: how ADX and +DI/-DI are calculated, what 20, 25 and 40 mean, how to use ADX to pick a method, and what our data shows on four markets.

Read More3 min
Forex Trading2026-11-01

Parabolic SAR: Settings, Formula and Backtest Results

Parabolic SAR explained: the formula, 0.02 / 0.2 settings, how to read the dots, why it whipsaws, and what a flip-every-signal test showed on four markets.

Read More2 min
Forex Trading2026-11-21

Fundamental Analysis in Forex: Interest Rates, Inflation and Data

Forex fundamental analysis explained: how interest rates, inflation, jobs, GDP and central banks move currencies, a table of key releases with official sources, a worked example and the limits.

Read More3 min