Join today
Strategies / Breakout / Morning Range Breakout

Morning Range Breakout with Adaptive Sizing

On the first bar of each day, the system places a buy stop at the 120 bar high and a sell stop at the 120 bar low. Only one trade is allowed per day. It aims for 35 points with a 60 point hard stop.

BreakoutLong & shortSwingBrent CrudeDaily
1.89Profit factor
7,714Net profit EUR
74.19%Win rate
434Trades
-719Max drawdown
17.77Avg trade

Best run of 39. Brent Crude, Daily, spread 3, from run pf:2026-09-15-BRENT-D.tsv:3.

Entry rules, long

  1. Members only
  2. Only if no trade has been taken or triggered today and it is not a weekend bar

Entry rules, short

  1. Members only
  2. Only if no trade has been taken or triggered today and it is not a weekend bar

Exit rules

  1. Stop 35 price units from the average entry price
  2. Members only
  3. Hard stop loss 60 points

Test conditions

PeriodUp to 2026-09-15
InstrumentBrent Crude, 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-16

Parameters

stopDistance
Price distance of the managed stop and the profit target
35
rangeBars
Bars in the breakout range, taken at the first bar of each day
120
stopLossPoints
Hard protective stop in points
60
profitStep
Size resets to 1 each time strategy profit gains this much
20
positionSize
Contracts; grows after a loss, shrinks after a win
1
profitMark
Strategy profit level that triggers the next size reset
20
inTrade
Seed for the in-trade flag, so size is not adjusted before the first trade
1
sizeAdjusted
Seed for the size-adjusted flag, so size is not adjusted before the first trade
1

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Brent CrudeBest runDaily1.89 43474.197,714 EUR-719
USD/JPYDaily1.86 1,08976.121,338,700 JPY-76,500
GBP/USDDaily1.70 1,09474.3118,262 USD-1,989
Dow Jones4 hours1.68 62671.7310,622 EUR-1,550
Gold10 min1.43 46855.777,053 EUR-1,102
GoldDaily1.39 27860.434,570 EUR-2,200
Gold15 min1.37 52854.557,646 EUR-1,961
SilverDaily1.34 42560.7129,069 USD-6,934
Dow Jones1 hour1.33 1,06561.6015,281 EUR-1,498
DAX 40Daily1.30 95462.7912,668 EUR-2,732
US Crude Oil4 hours1.29 1,04459.8715,081 EUR-2,352
Silver4 hours1.28 85756.0156,137 USD-7,984
Brent Crude4 hours1.28 74361.249,972 EUR-3,412
USD/JPY10 min1.25 91566.78802,240 JPY-282,690
EUR/USDDaily1.23 1,05467.4687,805 USD-28,557
Gold4 hours1.23 46852.996,138 EUR-3,127
USD/JPY15 min1.21 1,11467.24865,410 JPY-238,610
Nikkei 225Daily1.21 1,16073.1012,846 USD-5,694
Gold5 min1.21 36454.954,571 EUR-3,052
Dow Jones30 min1.19 1,34758.9517,804 EUR-6,660
Gold1 hour1.18 72852.888,638 EUR-3,600
S&P 500Daily1.18 40954.284,457 EUR-2,346
USD/JPY5 min1.16 52264.94325,240 JPY-130,880
GBP/USD4 hours1.15 1,63764.9413,171 USD-3,585
Nasdaq 1004 hours1.13 1,23557.0012,906 EUR-9,310
Gold30 min1.13 72451.807,513 EUR-4,038
USD/JPY4 hours1.12 1,12964.48438,870 JPY-180,040
USD/JPY1 hour1.11 2,05864.82922,930 JPY-335,090
US Crude Oil1 hour1.11 1,89654.5420,962 EUR-7,692
Nasdaq 10010 min1.11 1,26852.6813,948 EUR-7,963
Nasdaq 10015 min1.10 1,80852.3218,077 EUR-13,562
Brent Crude1 hour1.10 1,36553.4814,300 EUR-10,534
S&P 50030 min1.10 1,19351.5511,913 EUR-7,131
US Crude Oil30 min1.08 2,42652.9326,200 EUR-19,195
USD/JPY30 min1.07 1,81265.18588,350 JPY-559,030
S&P 50015 min1.07 1,08750.417,498 EUR-4,808
EUR/USD4 hours1.06 1,52564.2066,798 USD-60,183
GBP/USD1 hour1.06 3,05863.8711,410 USD-7,294
USD/JPY1 minn/a 8768.97122,500 JPY-50,710

Charts

Results by run

Profit factor by run

Above 1.0 made money, below 1.0 lost money.

0.00.51.01.52.01.0 = break-evenBrent Crude · Daily1.89USD/JPY · Daily1.86GBP/USD · Daily1.70Dow Jones · 4 hours1.68Gold · 10 min1.43Gold · Daily1.39Gold · 15 min1.37Silver · Daily1.34Dow Jones · 1 hour1.33DAX 40 · Daily1.30US Crude Oil · 4 hours1.29Silver · 4 hours1.28Brent Crude · 4 hours1.28USD/JPY · 10 min1.25EUR/USD · Daily1.23Gold · 4 hours1.23USD/JPY · 15 min1.21Nikkei 225 · Daily1.21Gold · 5 min1.21Dow Jones · 30 min1.19Gold · 1 hour1.18S&P 500 · Daily1.18USD/JPY · 5 min1.16GBP/USD · 4 hours1.15

Net profit against max drawdown

Net profitMax drawdown
0-1.0M-500K1.0M2.0MUSD/JPY · DailyUSD/JPY · 1 hourUSD/JPY · 15 minUSD/JPY · 10 minUSD/JPY · 30 minUSD/JPY · 4 hoursUSD/JPY · 5 minUSD/JPY · 1 minEUR/USD · DailyEUR/USD · 4 hoursSilver · 4 hoursSilver · DailyUS Crude Oil · 30 minUS Crude Oil · 1 hourGBP/USD · DailyNasdaq 100 · 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.

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

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

// --- Parameters ---
stopDistance = 35             // price distance of the managed stop and the profit target
rangeBars = 120               // bars in the breakout range, taken at the first bar of each day
stopLossPoints = 60           // hard protective stop in points
profitStep = 20               // size resets to 1 each time strategy profit gains this much

ONCE positionSize = 1         // contracts; grows after a loss, shrinks after a win
ONCE profitMark = 20          // strategy profit level that triggers the next size reset
ONCE inTrade = 1              // start as if in a trade, so no size change before the first trade
ONCE sizeAdjusted = 1         // start as already adjusted, same reason

// --- Indicators ---
weekendBar = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0

// New day: allow one trade and capture the range.
IF Day <> Day[1] THEN
  tradeTaken = 0
  rangeHigh = Highest[rangeBars](high)
  rangeLow = Lowest[rangeBars](low)
ENDIF

61 more lines: the entry and exit rules.

Read this first

Known weaknesses

  • Position size grows by 1 contract after every losing trade and resets once profit passes the next 20 unit mark. A losing streak can put several contracts at risk at once.
  • The hard stop (60 points) is larger than the target (35 points). The 74.19% win rate on Brent Crude Daily carries the result, and a drop in win rate would hurt fast.
  • Point based targets and stops do not scale across markets. USD/JPY 30 minutes made 588,350 JPY but with a 559,030 JPY drawdown.
  • Despite the name, DAX 40 was not the best market. DAX 40 Daily had a profit factor of 1.3.

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 I run it in ProOrder?

Yes. The stop orders, targets and the sizing logic are all in the code, and it takes at most one trade per day.

Which instruments were tested?

Brent Crude Daily was best with a profit factor of 1.89. USD/JPY Daily (1.86), GBP/USD Daily (1.7) and Dow Jones 4 hours (1.68) followed, and almost every other row was above 1.

How much capital does the sizing need?

The worst drawdown on Brent Crude Daily was 718.9 EUR, starting from 1 contract. Since size increases after losses, a longer losing run than the backtest had would cost more than that.

Why does it test well on daily bars?

On daily charts every bar is the first bar of a new day, so the system can set new orders each session. Intraday charts like Gold 10 minutes also worked, with a profit factor of 1.43.

Related

Strategies like this one

Resistance Breacher

Best run on the same market, Brent Crude.

1.58 PF · 142 trades

Buy After Price Fall

A similar profit factor.

1.88 PF · 312 trades

Breakout Regime Filter

Also a breakout strategy.

6.28 PF · 70 trades

Want to learn how position sizing changes a system like this? Join 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