Join today
Strategies / Breakout / DAX Range Breakout Trailing

DAX Range Breakout Trailing: Pullback Entries With a Trailing Exit

After price pulls back 20% of the day's range, a buy stop sits 7 points under the high, or a sell stop 7 points above the low after a bounce. The range must be 120 points or less and the levels 60 points apart, and Mondays are skipped. Winners are managed with a trailing stop of 22 points for longs and 21 for shorts.

BreakoutLong & shortSwingDow JonesDaily
n/aProfit factor
20,020Net profit EUR
61.99%Win rate
963Trades
-2,607Max drawdown
20.79Avg trade

Best run of 18. Dow Jones, Daily, spread 3, from run sweeps:2026-09-16-DOW30-D-opt.tsv:3.

Entry rules, long

  1. Not on Mondays
  2. Members only
  3. Only if the day's range is 120 points or less and the buy and sell levels are at least 60 points apart
  4. At most one long per day

Entry rules, short

  1. Not on Mondays
  2. Members only
  3. Only if the day's range is 120 points or less and the buy and sell levels are at least 60 points apart
  4. At most one short per day

Exit rules

  1. Members only
  2. Hard stop loss of 240 points (twice the maximum range)

Test conditions

PeriodUp to 2026-09-16
InstrumentDow Jones, 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-17

Parameters

positionSize
Contracts per trade
1
skipDay
Day of week with no new entries (1 = Monday)
1
maxAmplitude
Skip days whose range is wider than this, points
120
minAmplitude
Minimum gap between the two entry levels, points
60
orderDistance
Entry level offset inside the range, points
7
minPullbackPct
Pullback from the range extreme, percent of range, before a level is set
20
longTrailPoints
Trailing distance on longs, points
22
shortTrailPoints
Trailing distance on shorts, points
21

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Dow JonesBest runDailyn/a 96361.9920,020 EUR-2,607
Nikkei 225Dailyn/a 53156.1216,448 USD-2,304
US Crude OilDailyn/a 86560.236,785 EUR-2,214
Silver4 hoursn/a 15771.345,821 USD-4,653
Brent CrudeDailyn/a 54957.744,848 EUR-1,906
Silver1 hourn/a 7474.323,963 USD-3,401
Nasdaq 100Dailyn/a 27265.443,607 EUR-1,293
Nikkei 2251 minn/a 4383.721,287 USD-357
GoldDailyn/a 5371.701,141 EUR-477
Brent Crude5 minn/a 3393.94379 EUR-287
Nasdaq 1001 minn/a 2281.82241 EUR-206
Brent Crude1 minn/a 7100.00183 EUR-163
Gold30 minn/a 3100.0091.70 EUR-61.90
Gold5 minn/a 2100.0089.40 EUR-68.80
Gold10 minn/a 2100.0088.70 EUR-63.50
Gold15 minn/a 2100.0086.90 EUR-61.90
S&P 5002 minn/a 3100.0065.44 EUR-61.94
FTSE 1005 minn/a 1100.0027.40 EUR-21.00

Charts

Results by run

Net profit against max drawdown

Net profitMax drawdown
0-5K-3K13K25KDow Jones · DailyNikkei 225 · DailyUS Crude Oil · DailySilver · 4 hoursBrent Crude · DailySilver · 1 hourNasdaq 100 · DailyNikkei 225 · 1 minGold · DailyBrent Crude · 5 minNasdaq 100 · 1 minBrent Crude · 1 minGold · 30 minGold · 5 minGold · 10 minGold · 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.

// ============================================================
// DAX Range Breakout Trailing
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Breakout
// Direction: Long & short
// Timeframe tested: Daily
// ============================================================

// --- Settings ---
DEFPARAM CumulateOrders = false
DEFPARAM PreloadBars = 10000

// --- Parameters ---
positionSize = 1          // contracts per trade
skipDay = 1               // day of week with no new entries (1 = Monday)
maxAmplitude = 120        // skip days whose range is wider than this, in points
minAmplitude = 60         // entry levels must be at least this far apart, in points
orderDistance = 7         // entry level offset inside the range, in points
minPullbackPct = 20       // price must pull back this share of the range before a level is set
longTrailPoints = 22      // trailing distance on longs, in points
shortTrailPoints = 21     // trailing distance on shorts, in points

// No trading until the first new session has started.
ONCE sessionStarted = -1

// --- Indicators ---
IF DayOfWeek = skipDay THEN
  dayAllowed = 0
ELSE
  dayAllowed = 1
ENDIF

// Reset the day's levels on the first bar of each session.
IF IntradayBarIndex = 0 THEN
  longEntryLevel = 0
  shortEntryLevel = 0
  longTaken = 0
  shortTaken = 0
  sessionStarted = 1
ENDIF

// Set each entry level once price has pulled back far enough from the range extreme.
IF sessionStarted = 1 AND dayAllowed = 1 THEN
  IF longEntryLevel = 0 OR shortEntryLevel = 0 THEN
    rangeHigh = Highest[IntradayBarIndex + 1](high)
    rangeLow = Lowest[IntradayBarIndex + 1](low)
    rangeSize = rangeHigh - rangeLow
    minPullback = rangeSize * minPullbackPct / 100

    IF rangeSize <= maxAmplitude THEN
      IF shortEntryLevel = 0 AND (close - rangeLow) >= minPullback THEN
        shortEntryLevel = rangeLow + orderDistance
      ENDIF
      IF longEntryLevel = 0 AND (rangeHigh - close) >= minPullback THEN
        longEntryLevel = rangeHigh - orderDistance
      ENDIF
    ENDIF
  ENDIF
ENDIF

51 more lines: the entry and exit rules.

Read this first

Known weaknesses

  • Profit factor was not recorded because only sweep data exists.
  • The logic is built for intraday levels, but the best run is on Daily bars, where each level comes from a single bar. The result does not show how the intended intraday version behaves.
  • Several rows have almost no trades, such as FTSE 100 5 minutes with 1 trade and S&P 500 2 minutes with 3, so those 100% win rates mean nothing.
  • The 240 point hard stop is far wider than the 22 point trail, so a trade that never reaches the trail trigger can lose far more than a typical winner.

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 this run automatically in ProOrder?

Yes, it uses stop orders, a trailing stop and a hard stop, all supported in ProOrder. The rewritten code is not compile-checked yet, so demo test it first.

Which instruments were tested?

The best run was Dow Jones Daily with EUR 20,019.9 over 963 trades. Nikkei 225 Daily made USD 16,448.1 and US Crude Oil Daily EUR 6,785.2, while the intraday runs on S&P 500 and FTSE 100 took only a handful of trades.

How much drawdown with 1 contract?

The Dow Jones Daily run had a max drawdown of EUR 2,607.4 with 1 contract. Silver 4 hours saw USD 4,653.0 of drawdown.

Why does Daily work when the idea is intraday?

On Daily bars the range filter and levels come from one bar, which effectively turns it into a different, simpler system. Test the intraday timeframe yourself before relying on it.

Related

Strategies like this one

Navigator

Best run on the same market, Dow Jones.

2.93 PF · 181 trades

Breakout Regime Filter

Also a breakout strategy.

6.28 PF · 70 trades

Bollinger Band Walk

Also a breakout strategy.

3.10 PF · 148 trades

Talk trailing stops and breakout filters with other systematic traders. Join the ProRealAlgos waitlist.

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