Join today
Strategies / Trend / MA Cross Pullback

MA Cross Pullback: Entering Trends After the First Dip

After the 15 SMA crosses the 100 SMA, the system waits for price to close on the wrong side of the 15 SMA and then back through it. A close beyond the 100 SMA cancels the setup. Trades end at a 150 point stop or when an opposite entry reverses them.

TrendLong & shortIntradayGold2 min
n/aProfit factor
1,624Net profit EUR
36.74%Win rate
1,105Trades
-820Max drawdown
1.47Avg trade

Best run of 17. Gold, 2 min, spread 0.6, from run sweeps:2026-09-20-GOLD-2m-opt.tsv:3.

Entry rules, long

  1. The 15-period SMA has crossed above the 100-period SMA
  2. Members only
  3. Price closes back above the 15 SMA
  4. The setup is cancelled by any close below the 100 SMA

Entry rules, short

  1. The 15-period SMA has crossed below the 100-period SMA
  2. Members only
  3. Price closes back below the 15 SMA
  4. The setup is cancelled by any close above the 100 SMA

Exit rules

  1. Members only
  2. An opposite entry reverses the position

Test conditions

PeriodUp to 2026-09-20
InstrumentGold, 2 minutes
Spread0.6 points
Contracts1
Starting capital1,000,000
CostsSpread only. Commissions and overnight financing are not included.
BarsUp to 200,000 bars, fewer where the instrument has less history
Last tested2026-09-21

Parameters

positionSize
Contracts per trade
1
fastPeriod
Fast SMA length
15
slowPeriod
Slow SMA length
100
stopLossPoints
Protective stop in points
150

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
GoldBest run2 minn/a 1,10536.741,624 EUR-820
USD/JPYDailyn/a 8013.75909,310 JPY-748,100
USD/JPY10 minn/a 1,08837.68626,730 JPY-240,590
USD/JPY4 hoursn/a 18930.69608,410 JPY-346,200
USD/JPY5 minn/a 99936.94478,280 JPY-159,550
USD/JPY15 minn/a 1,05637.59469,080 JPY-351,910
EUR/USDDailyn/a 7320.55151,656 USD-32,530
Silver3 minn/a 1,09736.4643,616 USD-11,318
Silver2 minn/a 1,08635.5426,842 USD-20,073
GBP/USDDailyn/a 10618.8710,953 USD-5,481
Nasdaq 100Dailyn/a 6921.748,969 EUR-3,126
Brent Crude3 minn/a 1,07036.546,737 EUR-2,641
US Crude Oil3 minn/a 1,07236.756,372 EUR-4,128
US Crude Oil4 hoursn/a 14823.656,249 EUR-4,949
Brent CrudeDailyn/a 449.095,036 EUR-3,777
S&P 500Dailyn/a 7440.543,769 EUR-1,018
Gold15 minn/a 1,05936.542,680 EUR-1,000

Charts

Results by run

Net profit against max drawdown

Net profitMax drawdown
0-1.0M-500K500K1.0MUSD/JPY · DailyUSD/JPY · 10 minUSD/JPY · 4 hoursUSD/JPY · 5 minUSD/JPY · 15 minEUR/USD · DailySilver · 3 minSilver · 2 minGBP/USD · DailyNasdaq 100 · DailyBrent Crude · 3 minUS Crude Oil · 3 minUS Crude Oil · 4 hoursBrent Crude · DailyS&P 500 · DailyGold · 15 min

The code

ProBuilder, rewritten to house standard

Every file in the library uses the same header, the same section order and the same variable names. The numbers above were produced by the original version before the rewrite, and the rewrite has not yet been compiled in ProRealTime.

// ============================================================
// MA Cross Pullback
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long & short
// Timeframe tested: 2 minutes
// ============================================================

// --- Settings ---
DEFPARAM CumulateOrders = false

// --- Parameters ---
positionSize = 1          // contracts per trade
fastPeriod = 15           // fast SMA
slowPeriod = 100          // slow SMA
stopLossPoints = 150      // protective stop in points

// Setup flags, carried from bar to bar.
ONCE longCrossSeen = 0
ONCE longPullbackSeen = 0
ONCE shortCrossSeen = 0
ONCE shortPullbackSeen = 0

// --- Indicators ---
fastMA = Average[fastPeriod](close)
slowMA = Average[slowPeriod](close)

49 more lines: the entry and exit rules.

Read this first

Known weaknesses

  • Profit factor was not recorded because only sweep data exists.
  • The best run's average trade is only EUR 1.47 with a 36.74% win rate, so small changes in spread could remove the profit.
  • There is no profit target or rule exit, so open profits can give back a lot before a reversal or stop.
  • USD/JPY rows show huge figures like a JPY 748,100.0 drawdown on Daily, a sign the 150 point stop does not suit that price scale.

Indicators used

SMA

How to load it

  1. Copy the code with the copy button above the code block.
  2. In ProRealTime, open a chart of the instrument and timeframe you want to test, then open ProOrder > New trading system and choose "Create with programming".
  3. Paste the code, give the system a name and save it.
  4. Click "Backtest", set your own spread and position size, and run it before you consider trading it live.

Questions

About this strategy

Is MA Cross Pullback usable in ProOrder?

Yes, it only uses moving averages and a fixed stop. The rewritten code is not compile-checked, so run it on demo first.

How did it do on other markets?

Gold 2 minutes made EUR 1,623.9 and Gold 15 minutes EUR 2,680.0. S&P 500 Daily made EUR 3,768.77 on 74 trades.

What drawdown with 1 contract?

On Gold 2 minutes the max drawdown was EUR 820.1 with 1 contract, and on Gold 15 minutes EUR 999.8.

Why such a short timeframe?

The pullback pattern forms often on 2 minute Gold bars, giving 1,105 trades. The thin EUR 1.47 average trade means costs matter a lot there.

Related

Strategies like this one

Bollinger Squeeze

Uses the same indicator.

14.30 PF · 86 trades

Triple Band Market Model

Best run on the same market, Gold.

2.27 PF · 203 trades

Long-Term Moving Average Cross

Also a trend strategy.

12.31 PF · 61 trades

Join traders who test moving average systems side by side. Get on the ProRealAlgos waitlist.

The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.

Past backtest results do not guarantee future results. This is not financial advice. Curated and maintained by ProRealAlgos. ProRealTime™ is a trademark of ProRealTime SAS. prorealalgos.comStatsDocs