Opening range breakout strategy

On ES futures from January 2016 to July 2026, the opening range breakout lost $28,379 after costs and made money in 5 of 11 years.

BreakoutIntraday1-minute barsBacktested Nov 6, 2026

Opening range breakout backtest, the result

Contract

E-mini S&P 500

  • −$28.4K

    Net after costs

    After $77,029 in fees and slippage

  • 5 of 11

    Years that made money

    January 2016 to July 2026

  • −$95.2K

    Largest drawdown

    Peak to trough, 1 contract

  • −$11

    Average trade

    2,698 trades

Opening range breakout on ES, net after costs by month, from January 2016 to July 2026: −$28,379; buying and holding one ES contract: +$236,212

Net after costs by month, January 2016 to July 2026.

Opening range breakout rules

Buy when price closes above the first 30 minutes' range, sell short when it closes below, and be flat by the end of the day.

A drawing of the rules on a made-up day, not a result.

  1. The opening range is the high and low of the first 30 one-minute bars after the 9:30 New York open.
  2. After 10:00, the first one-minute close above the range buys and the first close below it sells short, once a day, until 15:00.
  3. The position is closed when a one-minute close crosses back through the other side of the range.
  4. Whatever is still open is closed at 15:45 New York.
Decides on
1-minute bars
Holds
Nothing overnight
Parameters
open minute 570, range minutes 30, last entry 900, exit minute 945

Results by year

It made money in 5 of 11 years on ES. Its best year was 2022, +$25,457, and its worst 2020, −$34,589.

Net after costs by year on ES, with trades, win rate, largest drawdown and buying and holding the same contract
YearNetTradesWin rateDrawdownBuy and hold
2016−$16,80125738%−$19,987+$11,497
2017−$4,76025141%−$8,951+$21,936
2018+$80325340%−$14,450−$8,589
2019−$12,98225239%−$20,427+$35,436
2020−$34,58925943%−$45,297+$27,761
2021−$4,49225549%−$15,957+$51,361
2022+$25,45725349%−$23,407−$45,939
2023+$10,66225546%−$16,446+$38,435
2024+$6,13325943%−$14,258+$42,947
2025+$9,72725647%−$38,415+$37,010
2026, Jan to Jul−$7,53714849%−$16,683+$24,355

Opening range breakout backtest results

On ES it made $48,650 before costs. Fees and slippage took $77,029, more than all of it.

Net = before costs − fees − slippage
ES: $48,650 − $9,579 − $67,450 = −$28,379
Every figure of the Opening range breakout backtest, by contract
FigureESNQ
Net after costs−$28,379−$99,024
Before costs+$48,650−$70,930
Fees$9,579$4,059
Slippage$67,450$24,035
Trades2,6981,195
Trades a year257266
Win rate44%42%
Profit factor0.970.79
Average trade−$11−$83
Average trade, 95% interval−$53 to $33−$143 to −$21
Sharpe ratio-0.14-1.21
Largest drawdown−$95,242−$100,819
Time in the market13%13%
Buying and holding the contract+$236,212+$401,004

The interval holds zero: this test cannot tell the average trade from no edge.

Opening range breakout code and Pine Script

The strategy as the backtest ran it, and the Pine Script our compiler wrote from it for TradingView.

Opening range breakout
opening_range_breakout.py
1from atlantive import BUY, NEW_YORK, SELL, Bars, Session, Strategy2 3 4class OpeningRangeBreakout(Strategy):5    """Opening range breakout on one-minute bars, New York day session.6 7    The range is the high and low of the first 30 one-minute bars after the 9:30 New York open.8    After it, the first one-minute close above the range buys and the first close below it sells9    short, once a day, until 15:00. The position is closed when a one-minute close crosses back10    through the other side of the range, or at 15:45 New York, so nothing is held overnight.11    """12 13    data = "bars"14 15    class Params:16        open_minute: int = 57017        range_minutes: int = 3018        last_entry: int = 90019        exit_minute: int = 94520        clip: int = 121 22    class State:23        clock: Session(zone=NEW_YORK)24        bars: Bars(interval_ns=60_000_000_000)25        hi: float26        lo: float27        range_day: int28        traded_day: int29 30    def on_event(self, view, ev, orders):31        self.clock.update(ev)32        if not self.bars.update(ev):33            return34        minute = self.clock.prev_minute35        day = self.clock.prev_day36        high = float(self.bars.prev_high)37        low = float(self.bars.prev_low)38        close = float(self.bars.prev_close)39        range_end = self.p.open_minute + self.p.range_minutes40        if minute >= self.p.open_minute and minute < range_end:41            if self.range_day != day:42                self.range_day = day43                self.hi = high44                self.lo = low45            else:46                self.hi = max(self.hi, high)47                self.lo = min(self.lo, low)48            return49        # The bar that just closed ends at minute + 1: at 15:45 the position is closed.50        late = minute + 1 >= self.p.exit_minute or self.range_day != day51        if view.position > 0:52            if close < self.lo or late:53                orders.ioc(side=SELL, qty=self.p.clip)54        elif view.position < 0:55            if close > self.hi or late:56                orders.ioc(side=BUY, qty=self.p.clip)57        elif self.range_day == day and self.traded_day != day:58            if minute >= range_end and minute < self.p.last_entry:59                if close > self.hi:60                    orders.ioc(side=BUY, qty=self.p.clip)61                    self.traded_day = day62                elif close < self.lo:63                    orders.ioc(side=SELL, qty=self.p.clip)64                    self.traded_day = day
1//@version=62// OpeningRangeBreakout, exported from Atlantive.3// Chart simulation: decisions use completed bars; market orders fill at the next bar open.4// Native fills, fees, data gaps and session boundaries can differ. Re-test on the target symbol.5// Use standard time-based candles and the strategy's timeframe, not synthetic chart prices.6// Pine v6 trims old trade records at its order limit; the strategy keeps calculating.7// Margin is explicitly disabled to retain the native signal simulation's sizing.8strategy("OpeningRangeBreakout", overlay=true, initial_capital=100000.0, commission_type=strategy.commission.cash_per_contract, commission_value=1.68, default_qty_type=strategy.fixed, default_qty_value=1, calc_on_every_tick=false, process_orders_on_close=false, slippage=0, margin_long=0, margin_short=0)9 10if timeframe.in_seconds() != 6011    runtime.error("OpeningRangeBreakout was exported for the 1 minute timeframe; set the chart to 1.")12 13open_minute = input.int(570, "open_minute", minval=-9007199254740991, maxval=9007199254740991)14range_minutes = input.int(30, "range_minutes", minval=-9007199254740991, maxval=9007199254740991)15last_entry = input.int(900, "last_entry", minval=-9007199254740991, maxval=9007199254740991)16exit_minute = input.int(945, "exit_minute", minval=-9007199254740991, maxval=9007199254740991)17clip = input.int(1, "clip", minval=-9007199254740991, maxval=9007199254740991)18 19_q_safe_int(x) =>20    if math.abs(x) > 900719925474099121        runtime.error("an integer left the exact chart range; this run cannot be compared faithfully")22    int(x)23_q_int(x) => _q_safe_int(x < 0 ? math.ceil(x) : math.floor(x))24_q_iadd(a, b) => _q_safe_int(a + b)25 26_q_high = _q_int(math.round(high * 1000000000.0))27_q_low = _q_int(math.round(low * 1000000000.0))28_q_close = _q_int(math.round(close * 1000000000.0))29 30var float hi = 0.031var float lo = 0.032var int range_day = 033var int traded_day = 034// clock: completed chart bar's opening timestamp (America/New_York).35_q_clock_prev_minute = hour(time, "America/New_York") * 60 + minute(time, "America/New_York")36_q_clock_prev_second = _q_clock_prev_minute * 60 + second(time, "America/New_York")37_q_clock_prev_weekday = (dayofweek(time, "America/New_York") + 5) % 738_q_clock_prev_day = int(timestamp("UTC", year(time, "America/New_York"), month(time, "America/New_York"), dayofmonth(time, "America/New_York"), 0, 0) / 86400000)39// Current clock: this chart bar's scheduled close, known without a future bar.40// A native next event after a data gap can carry a later time.41_q_clock_minute = hour(time_close, "America/New_York") * 60 + minute(time_close, "America/New_York")42_q_clock_second = _q_clock_minute * 60 + second(time_close, "America/New_York")43_q_clock_weekday = (dayofweek(time_close, "America/New_York") + 5) % 744_q_clock_day = int(timestamp("UTC", year(time_close, "America/New_York"), month(time_close, "America/New_York"), dayofmonth(time_close, "America/New_York"), 0, 0) / 86400000)45_q_clock_seen = 146int minute_l = na47int day = na48float high_l = na49float low_l = na50float close_l = na51int range_end = na52bool late = false53 54bool _q_running = true55minute_l := _q_int(_q_clock_prev_minute)56day := _q_int(_q_clock_prev_day)57high_l := _q_high * 1.058low_l := _q_low * 1.059close_l := _q_close * 1.060range_end := _q_int(_q_iadd(open_minute, range_minutes))61if minute_l >= open_minute and minute_l < range_end62    if range_day != day63        range_day := _q_int(day)64        hi := high_l65        lo := low_l66    else67        hi := math.max(hi, high_l)68        lo := math.min(lo, low_l)69    _q_running := false70if _q_running71    late := _q_iadd(minute_l, 1) >= exit_minute or range_day != day72if _q_running73    if _q_int(strategy.position_size) > 074        if close_l < lo or late75            _q_qty1 = _q_int(clip)76            if _q_qty1 <= 077                runtime.error("market order quantity must be a positive whole unit")78            _q_pos1 = _q_int(strategy.position_size)79            if _q_pos1 < 0 or _q_pos1 > 0 and _q_qty1 < _q_pos180                runtime.error("this order would add to or partially reduce a position, so its trade ledger would not be faithful")81            strategy.order("q1", strategy.short, _q_qty1)82    else if _q_int(strategy.position_size) < 083        if close_l > hi or late84            _q_qty2 = _q_int(clip)85            if _q_qty2 <= 086                runtime.error("market order quantity must be a positive whole unit")87            _q_pos2 = _q_int(strategy.position_size)88            if _q_pos2 > 0 or _q_pos2 < 0 and _q_qty2 < -_q_pos289                runtime.error("this order would add to or partially reduce a position, so its trade ledger would not be faithful")90            strategy.order("q2", strategy.long, _q_qty2)91    else if range_day == day and traded_day != day92        if minute_l >= range_end and minute_l < last_entry93            if close_l > hi94                _q_qty3 = _q_int(clip)95                if _q_qty3 <= 096                    runtime.error("market order quantity must be a positive whole unit")97                _q_pos3 = _q_int(strategy.position_size)98                if _q_pos3 > 0 or _q_pos3 < 0 and _q_qty3 < -_q_pos399                    runtime.error("this order would add to or partially reduce a position, so its trade ledger would not be faithful")100                strategy.order("q3", strategy.long, _q_qty3)101                traded_day := _q_int(day)102            else if close_l < lo103                _q_qty4 = _q_int(clip)104                if _q_qty4 <= 0105                    runtime.error("market order quantity must be a positive whole unit")106                _q_pos4 = _q_int(strategy.position_size)107                if _q_pos4 < 0 or _q_pos4 > 0 and _q_qty4 < _q_pos4108                    runtime.error("this order would add to or partially reduce a position, so its trade ledger would not be faithful")109                strategy.order("q4", strategy.short, _q_qty4)110                traded_day := _q_int(day)

How it was tested

The published rules, never tuned on the data, with real costs on every fill. Every strategy here is tested the same way.

Market data
CME Globex 1-minute bars, Jan 2, 2016 to Jul 31, 2026
Rules
As published, with the published parameters, never tuned on this data
Size
1 contract on every trade
Contract
The most traded one, rolled as the market moved
Fees
The broker's $0.50 a side, plus CME's and the NFA's fees when the window opens
Slippage
1 tick a side on ES, 2 in NQ's regular session and 3 outside it, 1 on other markets, where it was not measured
Stops and entries
Tested on 1-second closes and filled at the next bar
Contracts traded
ES: 43 contracts, ESH6 to ESU6NQ: 43 contracts, NQH6 to NQU6
Costs paid
ES: $9,579 in fees, $67,450 in slippageNQ: $4,059 in fees, $24,035 in slippage
Warm-up
None: each contract reads only its own bars
Flagged days
ES: NoneNQ: None Days the data holds too few bars for. Flagged, not removed.

Could you pass
a prop firm challenge
with the opening range breakout?

A backtest says whether a strategy makes money. Our AI runs its trades through the rules of every prop firm account, then tells you which one it would pass and at what size.

No card needed. Free credits every month.

  • Most money: Blue Guardian Futures Direct 50K, $5,084
  • Best payout odds: Funded Futures Family Straight to Funded 50K, 98%
  • Fastest pass: Phidias Express to Live 50K, 11 days
Blue Guardian Futures Direct 50K
Most money

$5,084

Median net across 2,000 simulated runs

Evaluation
None
First payout
97%
Fees paid
$1,521

Median net across 2,000 simulated runs

Best 5%$13,143Worst 5%−$412
Day 060120180
Example: ES opening range breakout

Questions about the opening range breakout

What is the opening range breakout?

Buy when price closes above the first 30 minutes' range, sell short when it closes below, and be flat by the end of the day. The rules follow Toby Crabel, Day Trading with Short Term Price Patterns and Opening Range Breakout (1990). Atlantive backtested it on CME futures from January 2016 to July 2026 after costs.

Is the opening range breakout profitable on ES futures?

Not in this backtest: on ES futures from January 2016 to July 2026 it lost $28,379 after costs, over 2,698 trades, positive in 5 of 11 years; on NQ it lost $99,024. Buying and holding one ES contract over the same window made $236,212. The average trade was −$11, its 95% interval −$53 to $33. These are hypothetical results of a backtest, not of trading.

What are the opening range breakout's rules?

The opening range is the high and low of the first 30 one-minute bars after the 9:30 New York open. After 10:00, the first one-minute close above the range buys and the first close below it sells short, once a day, until 15:00. The position is closed when a one-minute close crosses back through the other side of the range. Whatever is still open is closed at 15:45 New York. The rules follow Toby Crabel, Day Trading with Short Term Price Patterns and Opening Range Breakout (1990). Its parameters are the published ones, never tuned on the data it was tested on.

How was the opening range breakout backtested?

On CME Globex data from January 2016 to July 2026, one contract, on 1-minute bars, rolled to the most traded contract as the market moved, with the broker's and CME's fees and the slippage measured on each market. Stops and entries were tested on 1-second closes and filled at the next bar. Nothing was fitted to the data.

Can I run the opening range breakout in TradingView?

Yes. The page carries its Pine Script, written by Atlantive's compiler from the same code the backtest ran, for TradingView's strategy tester. A chart's fills and fees can differ from the backtest's, so test it again on the symbol you trade.

Can I change the opening range breakout and test it again?

Yes. Rerun it in Atlantive: a new chat opens with the strategy's rules in the box, for you to read, change and send. The agent writes the code, backtests it on the market and window you name, and reports the result with its costs.

Rerun it in Atlantive. Change the market, the dates or a rule, then send it.

A new chat opens with this in the box

Backtest an opening range breakout on ES, 2016-01-02 to 2026-07-31, one contract on a $100,000 account with default costs: the range is the first 30 one-minute bars after 9:30 New York; the first one-minute close above it buys and below it sells short, once a day until 15:00; exit on a one-minute close back through the other side of the range or at 15:45.

Never sent for you

May we measure this visit?

With your consent, Google Analytics and PostHog count visits to these pages. You can separately allow Google Ads to measure visits from our ads. Visit measurement starts only after you choose. Cookie policy