Join waitlist
Strategies / Trend / Moving Average Pullback Long

Moving Average Pullback Long

The strategy buys when the close crosses back above its 50-bar average during an uptrend, within 10 bars of a dip below it. It exits when the 50-bar average crosses under the 200-bar average, with a stop set at a recent low.

TrendLong onlySwingDAX 40Daily
n/aProfit factor
9,810Net profit EUR
59.09%Win rate
22Trades
-3,843Max drawdown
446Avg trade

Best run of 9. DAX 40, Daily, spread 3, from run sweeps:2026-10-12-DAX40-D-opt.tsv:33.

Entry rules, long

  1. The 50-bar average is above the 200-bar average, and the 252-bar rate of change is above 15%.
  2. The 200-bar average has risen over the last 20 bars.
  3. No position is open, and signals start after the first 260 bars.

Exit rules

  1. The stop is set at the lower of the 20-bar low and the 200-bar average, one bar earlier, and its distance is applied from the entry fill.

Test conditions

PeriodUp to 2026-10-12
InstrumentDAX 40, Daily
Spread3 points
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-10-12

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
DAX 40Best runDailyn/a 2259.099,810 EUR-3,843
Nikkei 225Dailyn/a 1546.6736,134 USD-15,140
Nikkei 2254 hoursn/a 1060.0015,032 USD-7,424
Nasdaq 100Dailyn/a 2157.149,475 EUR-8,787
Brent Crude4 hoursn/a 1275.006,146 EUR-3,355
Nasdaq 1004 hoursn/a 966.675,426 EUR-2,574
GoldDailyn/a 1450.003,655 EUR-1,466
FTSE 100Dailyn/a 1643.752,345 EUR-1,537
S&P 5004 hoursn/a 560.00634 EUR-308

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Moving Average Pullback Long
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long only
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE lastcu = -100000
ONCE stoppx = 0

smaf = Average[50](close)
smas = Average[200](close)
myRoc = (close - close[252]) / close[252] * 100
ll = lowest[20](low)

24 more lines: the entry and exit rules.

Setup

How to load it

  1. Copy the code with the copy button on 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.

Indicators used

SMA
Read this firstKnown weaknesses2 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The best run has only 22 trades, which is a small sample to judge it on.

Questions

About this strategy

Can I run Moving Average Pullback Long in ProOrder?

Yes. The code is ProBuilder and runs as an automated ProOrder system. Backtest it on your own account with your own spread and position size before trading it live.

Which markets was it tested on?

It was tested on 9 market and timeframe combinations. The best run by trade count was DAX 40, Daily, with 22 trades.

How large was the drawdown?

The best run had a maximum drawdown of 3,843 EUR at the tested position size, against a net result of 9,810 EUR.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 trades

Heikin Ashi Color Flip

Best run on the same market, DAX 40.

1.12 PF · 3,692 trades

ADX Filtered EMA Cross

Also a trend strategy.

1.15 PF · 607 trades

Get the full rules, the complete code and the ProRealAlgos portfolio as a member.

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