Join today
Strategies / Mean reversion / Trend Pullback Reversal

Trend Pullback Reversal

In an uptrend, defined as price above a rising 125-period SMA, it buys when the close dips below the 14-period SMA. In a downtrend it shorts when the close pops above the 4-period SMA. Longs exit on a close back above the 14 SMA and above the prior close, and shorts use the mirror rule.

Mean reversionLong & shortSwingNasdaq 100Daily
1.47Profit factor
15,121Net profit EUR
63.49%Win rate
849Trades
-2,829Max drawdown
17.81Avg trade

Best run of 5. Nasdaq 100, Daily, spread 3, from run pf:2026-09-24-NAS100-D.tsv:4.

Entry rules, long

  1. Close is above the rising 125-period SMA
  2. Members only
  3. No long open

Entry rules, short

  1. Close is below the falling 125-period SMA
  2. Members only
  3. No short open

Exit rules

  1. Members only
  2. Close a short when price closes below the 4-period SMA and below the previous close
  3. No stop loss or target

Test conditions

PeriodUp to 2026-09-25
InstrumentNasdaq 100, Daily
Spread3 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-25

Parameters

positionSize
Contracts per trade
1
trendPeriod
Trend SMA length
125
longPullbackPeriod
SMA a long must dip below, and later close above to exit
14
shortPullbackPeriod
SMA a short must pop above, and later close below to exit
4

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Nasdaq 100Best runDaily1.47 84963.4915,121 EUR-2,829
USD/JPYDailyn/a 1,27968.26534,800 JPY-403,450
EUR/USDDailyn/a 1,25567.8967,985 USD-29,275
US Crude OilDailyn/a 1,06064.918,939 EUR-7,982
GBP/USDDailyn/a 1,27866.985,422 USD-3,476

Charts

Results by run

Net profit against max drawdown

Net profitMax drawdown
0-500K-250K500K1.0MUSD/JPY · DailyEUR/USD · DailyNasdaq 100 · DailyUS Crude Oil · DailyGBP/USD · Daily

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.

// ============================================================
// Trend Pullback Reversal
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Mean reversion
// Direction: Long & short
// Timeframe tested: Daily
// ============================================================

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

// --- Parameters ---
positionSize = 1          // contracts per trade
trendPeriod = 125         // trend SMA length
longPullbackPeriod = 14   // SMA a long must dip below, and later close above to exit
shortPullbackPeriod = 4   // SMA a short must pop above, and later close below to exit

// --- Indicators ---
trendMA = Average[trendPeriod](close)
longPullbackMA = Average[longPullbackPeriod](close)
shortPullbackMA = Average[shortPullbackPeriod](close)

26 more lines: the entry and exit rules.

Read this first

Known weaknesses

  • There is no stop loss or target, so a pullback that turns into a reversal is held until the exit rule triggers.
  • The best run's max drawdown was EUR 2,829.4 at 1 contract, against EUR 15,121.3 net profit.
  • Only four other markets are listed, all from sweeps without a recorded profit factor. USD/JPY daily drew down JPY 403,450.
  • All listed results are on daily bars, and longs and shorts use different exit averages (14 SMA and 4 SMA), which adds fitted choices.

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

Can it run in ProOrder?

Yes, it is fully rule-based. The rewritten code was not compile-checked, so run it in ProBacktest before going live.

How did it do on other markets?

USD/JPY, EUR/USD, GBP/USD and US Crude Oil daily were all positive. EUR/USD made USD 67,985 over 1,255 trades.

How much capital risk at 1 contract?

The Nasdaq 100 best run had a max drawdown of EUR 2,829.4. Scale to your own account based on that figure.

Why daily bars?

The 125-period trend filter needs a slow chart. All listed results are daily.

Related

Strategies like this one

Bollinger Squeeze

Uses the same indicator.

14.30 PF · 86 trades

Negated Hammer

Best run on the same market, Nasdaq 100.

3.20 PF · 372 trades

Pullback Candle MA Filter

A similar profit factor.

1.49 PF · 1,050 trades

Pullback systems are a core part of our live mix. Join the ProRealAlgos waitlist to learn more.

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