Alan Ross

Alan Ross Forex

Free Forex Indicators, MetaTrader Tools and Honest Trading Guides

Indicators

EMA Pullback Scalping Setup for MT4: The 9/21 Pullback Made $0.40 an Ounce on Gold M5 After Cost, and All 24 Period Pairs Lost on EURUSD

Key takeaways

  • This guide sets up a 9 and 21 EMA pullback in MT4 and MT5 and shows what it did on 13,736 gold M5 bars and 16,926 EURUSD M5 bars from June to August 2026, after a real cost on every trade.
  • On gold it made +$0.40 an ounce per trade after a $0.30 cost over 2,554 signals held one hour, positive in both halves of the data. Taking one trade at a time it made +$0.63 over 731 trades.
  • Its neighbours held too: all 12 pairs with a fast EMA of 8, 9 or 10 and a slow EMA from 21 to 50 stayed positive in both halves.
  • Hold for about an hour. Exits at 15 and 30 minutes lost $0.08 a trade, and a tight 1 ATR stop with a 1.5 ATR target lost $0.42.
  • Do not use it on EURUSD. All 24 period pairs I tried lost on EURUSD M5, between 1.10 and 1.35 pips a trade after a 1-pip spread.

A moving average pullback is the most common scalping setup after the plain crossover: wait for the trend, then buy the dip to the fast EMA. This guide covers where to click in MT4 and MT5, the exact rule I tested, which periods held up on gold, how long to hold, and why the same template lost on EURUSD.

The full test of 20 moving average rules, including the crossovers that failed, is in my moving average scalping test. What happened to the same rules on M15 and H1 is in moving average scalping vs day trading.

How do you add the 9 and 21 EMA in MT4?

MetaTrader chart with two exponential moving averages
  1. Open a gold M5 chart. Your broker may call it XAUUSD or GOLD. Click M5 on the Timeframes toolbar.
  2. Add the first average: Insert → Indicators → Trend → Moving Average.
  3. Set it: Period 9, Shift 0, MA method Exponential, Apply to Close. Pick a bright colour and width 2.
  4. Add the second average the same way: Period 21, MA method Exponential, Apply to Close, a darker colour.
  5. Save it: right-click the chart → Template → Save Template, and name it “EMA pullback 9-21”.

In MT5 the path is the same: Insert → Indicators → Trend → Moving Average, with Method set to Exponential. What each of the four fields does is covered in my moving average settings for MT4 guide, and the platform differences in MT4 vs MT5.

What is the signal, exactly?

Trader checking an EMA pullback on a gold chart
  • Trend up: the 9 EMA is above the 21 EMA.
  • Buy when, in that trend, the previous candle closed above the 9 EMA and the current candle’s low touches or goes below the 9 EMA, but the candle closes back above it.
  • Sell is the mirror: 9 below 21, the previous candle closed below the 9, the current candle’s high reaches the 9 and it closes back below.
  • Enter at the close of that candle, not when the price first touches the line during the 5 minutes.
  • Exit one hour later. Use a wide safety stop if you want one; the test had no stop on this exit.

What did it make on gold?

Gold M5, 9/21 pullback, 1-hour holdTradesAfter $0.30Won1st half2nd halfRandom, best 5%
Every signal2,554+$0.4049.6%+$0.32+$0.45+$0.13
One trade at a time731+$0.6350.3%+$1.01+$0.38+$0.39

Gold (XAUUSD), June 16 to August 26, 2026, split at July 15. Dollars per ounce per trade after cost. “Random, best 5%” is where the top 5% of 200 runs of random entries with the same number of trades and the same exit finished.

The rule fired about 49 times a day, often several times in a row in a strong trend, so the first row counts trades that overlap. If you trade one position at a time, skipping signals while a trade is open, you get the second row: 731 trades, +$0.63 each, and still above the best 5% of random entries. Wins and losses were close to even, so the profit came from winners being a little larger than losers.

Which EMA periods held up?

Gold M5, 1-hour hold, after $0.30Slow 21Slow 26Slow 34Slow 50
Fast 5+$0.12+$0.18+$0.21+$0.17
Fast 8+$0.28+$0.35+$0.38+$0.25
Fast 9+$0.40+$0.41+$0.48+$0.39
Fast 10+$0.26+$0.27+$0.26+$0.24
Fast 12+$0.09+$0.20+$0.22+$0.19
Fast 13-$0.11-$0.02-$0.07-$0.12

Every signal counted. Positive in both halves: all four cells in rows 8, 9 and 10, plus 12/34 and 12/50. Every cell in row 5 lost money in the first half.

Use a fast EMA of 8 to 10. Inside that band the result barely depended on the slow EMA, which is what you want to see. 9/34 was the top cell, but picking the single best cell of a grid is how settings stop working later, as my optimized vs default settings test showed. I kept 9/21 because it is the standard pair and sits in the middle of the band that held.

How long should you hold the trade?

Gold M5, 9/21 pullback, exitAfter $0.301st half2nd half
After 15 minutes-$0.08-$0.08-$0.08
After 30 minutes-$0.08-$0.14-$0.04
After 1 hour+$0.40+$0.32+$0.45
After 2 hours+$0.79+$0.16+$1.22
Stop 1 ATR, target 1.5 ATR-$0.42-$0.76-$0.19

One hour. Two hours made more on average, but almost all of it came in the second half: +$0.16 in the first against +$1.22 in the second. MT4 has no built-in time exit, so set an alert or a timer for an hour and close by hand, or use an EA that closes by time. Do not add a tight bracket: with gold’s typical M5 ATR of $4.62, a 1 ATR stop sits inside normal noise. If you want a moving stop instead, my trailing stop settings for MT4 covers what the built-in trail can and cannot do.

How much cost can the setup take?

Before cost the pullback made +$0.70 an ounce per trade (every signal) and +$0.93 one at a time. That is your ceiling for spread plus commission per ounce. At $0.30 it kept +$0.40; at $0.50 it would keep about +$0.20 per trade on every signal. If your gold spread is wider than $0.70 during the hours you trade, the setup has nothing left. Check your broker’s real numbers with my spread and swap guide, and the hours when gold moves most in my gold scalping session test.

Why doesn’t the template work on EURUSD?

EURUSD M5, 9/21 pullback, 1-hour holdTradesBefore costAfter 1 pip1st half2nd half
Every signal1,732-0.25-1.25-1.21-1.28
One trade at a time718-0.14-1.14-0.88-1.36

EURUSD, June 3 to August 26, 2026, pips per trade.

On EURUSD the pullback lost before the spread, and all 24 period pairs from the grid above lost between 1.10 and 1.35 pips a trade after it. A 1-pip spread was 20% of EURUSD’s average one-hour move against 3.4% for $0.30 on gold. If you want a moving average rule on EURUSD M5, the only one that paid in my test was the slow EMA 50/200 cross held an hour, +0.63 pips a trade on 101 trades. The gold vs EURUSD test with one rule found the same split between the two markets.

What mistakes should you avoid with an EMA pullback in MT4?

  • Entering on the touch. The rule needs the candle to close back above the 9 EMA. A touch that closes below is a different trade.
  • Using SMA by accident. MT4’s Moving Average defaults to Simple. Change MA method to Exponential on both lines.
  • Taking profit after 15 or 30 minutes. The quick exits lost in both halves.
  • Copying it to another symbol without testing. It lost on EURUSD at every period I tried.
  • Stacking more indicators on top. My multi-indicator MT4 template test found only 23 of 192 indicator combinations made money.

If you also want to filter by a higher timeframe, my multi-timeframe analysis guide for MT4 found an H1 EMA 50 filter helped gold M5 entries. More gold settings tested on the same bars are in best MT4 settings for gold scalping.

Frequently asked questions

What are the best EMA settings for a pullback scalp on gold?

In my test, a fast EMA of 8 to 10 with a slow EMA of 21 to 50 on gold M5, held one hour. 9/21 made +$0.40 an ounce per trade after a $0.30 cost on 2,554 signals, positive in both halves.

Does the 9 and 21 EMA strategy work on EURUSD?

Not on EURUSD M5 in this test. The 9/21 pullback lost 1.25 pips a trade after a 1-pip spread, and the 9/21 crossover lost 1.65, both held one hour.

How do I set an EMA in MT4?

Insert → Indicators → Trend → Moving Average, then set the Period, choose Exponential as the MA method and leave Apply to on Close.

How long should I hold an EMA pullback scalp?

About an hour on gold M5. Exits after 15 and 30 minutes lost $0.08 a trade after cost, and a 1-hour exit made +$0.40.

Should I use a stop loss with the EMA pullback?

Not a tight one. A 1 ATR stop with a 1.5 ATR target lost $0.42 a trade on gold. If you use a stop, place it well beyond normal M5 noise.

Want a clean indicator to install right now?

It is my own enhanced DeMARK Trend Line indicator for MetaTrader 4 and 5. Non repaint, clean, and free.

Download the Free DeMARK Indicator

Written by Alan Ross

Forex trader and MetaTrader indicator developer. I build and test MT4 and MT5 tools, then write the honest version of how they actually work. More about me.

Last reviewed October 2026
Alan Ross
Alan Ross

Forex educator and indicator developer. I build and trade my own MetaTrader tools, and share the ones that genuinely help.

Leave a comment

Your email address will not be published. Comments are reviewed before they appear.