Join waitlist
Strategies / Mean reversion / SMA Pullback Long With Stop

SMA Pullback Long With Stop

The strategy buys when price is above the 200-bar average but below the 10-bar average, and sells when price closes above the 10-bar average. It also exits if the close falls more than 0.10 below the entry price.

Mean reversionLong onlySwingS&P 500Daily
1.79Profit factor
3,955Net profit EUR
66.96%Win rate
902Trades
-560Max drawdown
4.38Avg trade

Best run of 8. S&P 500, Daily, spread 1, from run pf:2026-10-10-USA500-D.tsv:4.

Entry rules, long

  1. The close is above the 200-bar simple moving average

Exit rules

  1. The close is more than 0.10 below the entry price, measured as a fraction of the close, checked from the bar after the fill

Test conditions

PeriodUp to 2026-10-10
InstrumentS&P 500, Daily
Spread1 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-10

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
S&P 500Best runDaily1.79 90266.963,955 EUR-560
Nasdaq 100Daily1.70 74067.4315,200 EUR-2,512
EUR/USDDailyn/a 54770.7550,017 USD-28,720
Nikkei 225Dailyn/a 59072.3723,286 USD-9,919
Dow JonesDailyn/a 85771.6519,885 EUR-6,967
DAX 40Dailyn/a 86068.3711,275 EUR-2,941
Dow Jones4 hoursn/a 59474.247,166 EUR-3,968
GoldDailyn/a 67865.631,093 EUR-636

Charts

Results by run

Above 1.0 made money, below 1.0 lost money.

The code

ProBuilder code, as tested

// ==============================================================
// SMA Pullback Long With Stop
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Mean reversion
// Direction: Long only
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE buyprice = 0

maslow = Average[200](close)
mafast = Average[10](close)

23 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
Longer historyRe-run on up to 1,000,000 barsS&P 500 · Daily · older data 0.00 EUR

S&P 500 had no history beyond the standard run, so both runs used 14,000 bars.

S&P 500 · Daily

Bars available14,000
Net, standard 200,000-bar run3,954.60 EUR
Net, long run3,954.60 EUR
Net on the older data alone0.00 EUR
Read this firstKnown weaknesses2 points
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.
  • Results include the spread only. Commissions and overnight financing are not included.

Questions

About this strategy

Can I run SMA Pullback Long With Stop 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 8 market and timeframe combinations. The best run was S&P 500, Daily, with a profit factor of 1.79 over 902 trades.

How large was the drawdown?

The best run had a maximum drawdown of 560 EUR at the tested position size, against a net result of 3,955 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

CCI Sign With EMA Alignment

Best run on the same market, S&P 500.

1.23 PF · 1,253 trades

Dual Setup Band Dip Buyer

Also a mean reversion strategy.

1.80 PF · 195 trades

See how ProRealAlgos combines strategies like this into one automated portfolio.

Copy trading on US indices is available to ProRealAlgos members as spots open.

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