How to backtest an ES opening-range breakout with explicit rules
Define a completed cash-open range, one daily entry, false-breakout exits, and contract costs before judging an ES opening-range backtest.
An ES opening-range breakout sounds simple: mark the first 15 minutes, buy above the high, sell below the low. But a backtest needs answers a chart sketch can leave open. Does a wick count? Can the strategy enter while the range is still forming? Does a stopped-out long permit a short later that morning?
Start with a completed range, then define the order and the daily state that surrounds it. The specification below is an illustrative research recipe; the separate product pilot uses a shorter window and a continuous series, and does not establish that 15 minutes is the best range length.
Anchor the range to the cash open
Use 09:30–09:45 in America/New_York for this example. NYSE’s normal core equity session starts at 09:30 Eastern Time; its calendar also identifies holidays and early closes. That cash-market reference is a deliberate choice for an ES strategy. NYSE trading hours and calendar.
ES trades across a much wider futures session. CME describes ES as having nearly 24-hour access, so the first bar of the futures trading day need not be the cash-open bar. An overnight high-low range and a cash-open high-low range answer different questions. CME ES product specifications.
Use the named New York timezone rather than fixing the opening time to one UTC hour. Check a winter date and a summer date: the intended wall-clock open stays at 09:30 through daylight-saving changes. Keep the data timestamp convention separate from the timezone used to define the strategy’s day.
For one-minute bars labeled by their opening time, the range includes the bars from 09:30 through 09:44. Each must be complete before its high and low contribute to the final range. The bar opening at 09:45 belongs to the entry phase.
| New York time | Range state | Permitted action |
|---|---|---|
| Before 09:30 | No range for today’s setup | No entry |
| 09:30 to before 09:45 | High and low still developing | Collect range bars only |
| 09:45 | Last range bar has closed; freeze high and low | Arm entry rules |
| From 09:46 | First post-range minute has closed | Evaluate completed-bar breakout signals |
| 15:00 | Entry window closed | Cancel an unfilled entry; manage an existing position |
| 15:55 | Exit cutoff | Close any remaining position |
These are example strategy cutoffs, not exchange closing times. Exclude cash-market holidays and early-close dates from this first recipe. Treat missing bars as a data problem, not a quiet no-trade day.
Write one complete experiment
Freeze the following assumptions before looking at returns. Start with a named contract and a short window; extend the sample only after checking that the rules behave correctly.
| Setting | Illustrative specification |
|---|---|
| Instrument and venue | CME E-mini S&P 500 March 2026 futures, ESH26; resolve the exact instrument in the data source |
| Historical window | January 5 through February 27, 2026, inclusive; full cash-session dates, excluding January 19 and February 16 holidays |
| Data and signals | Completed one-minute bars; range from 09:30 through 09:44 New York time |
| Starting equity and quantity | $50,000 research account; one ES contract; no scaling or compounding |
| Long signal | Previous close at or below range high; current close at least one tick above it |
| Short signal | Previous close at or above range low; current close at least one tick below it |
| Signal window | Post-range bars whose closing time is after 09:45 and before 15:00 |
| Entry | Market order at the next bar open, only if that opening time is before 15:00 |
| Daily limit | First submitted entry order consumes the day’s allowance, in either direction; no retries or reversals |
| Protective stop | Long at frozen range low; short at frozen range high |
| Failed-breakout exit | Long: a completed close at or below range high; short: a close at or above range low; exit next bar open |
| Time exit | Market exit at the 15:55 bar open; no overnight position |
| Profit target | None in this recipe |
| Costs | Assumed $2.50 per contract per side in all-in fees; one tick of adverse slippage on each market or stop fill |
| History and coverage | Begin before 09:30; require every one-minute bar from 09:30 through 15:55 for range, signals, management, and exits; reject incomplete dates or a zero-width range |
The fees and slippage are teaching assumptions, not a broker quote or a measured execution cost. Record the actual fee model, contract multiplier, tick size, margin requirements, and fill settings used by any run. A point-based rule is incomplete if the report accounts for futures dollars incorrectly.
A recorded product pilot
We saved the opening-range rules in a dedicated demo account and executed a smaller diagnostic run: FUT:CME:ES.v.0, January 5–9, 2026, one-minute bars, one contract, and $500,000 starting capital. The product exposes this volume-continuous identifier; searches for ESH26 and ESH6 returned no selectable outright contract, and a March ESH26 bar request returned no data. This pilot therefore does not reproduce the named-contract, $50,000, January–February experiment above.
The report contains five completed trades, four long and one short, with one entry on each of the five dates. It reports $2,250 P&L and $502,250 ending equity. All five trade fees are zero despite a saved $2.50 futures fee setting; the fee discrepancy remains unresolved, so the result is not a reconciled result after the stated costs. Five sessions also provide no evidence of durable profitability.
Keep range formation and entry permission separate
A range indicator can expose a running high and low before the range has finished. Numeric output alone is therefore not permission to enter. Require both a completed range and an eligible post-range signal bar.
Freeze the two boundaries for the rest of the day. If a new breakout high moves the range high upward, the rule is testing a moving channel rather than the specified opening range. On the next eligible date, clear the old boundaries and daily entry allowance before forming the new range.
Long and short rules must share that allowance. Two independent “once per day” entry rules can still allow two trades: one long and one short. Being flat is also insufficient; it becomes true again after a loss. Keep a separate state meaning “today’s entry opportunity has been used,” including while an order is pending.
Stratifyre’s rule documentation describes conditions, execution frequency, and local variables. When translating the recipe, inspect how those pieces combine across both directions instead of assuming a per-rule limit implements a strategy-wide daily limit. Stratifyre rules documentation.
Define a failed breakout before seeing one
This recipe requires a close outside the range, with a one-tick buffer. A wick above the high that closes inside produces no long signal. That is different from placing a stop-entry order above the range and filling as soon as price touches it.
After a long entry, a completed close back at or below the range high is a failed breakout. Submit the exit for the next bar open; do not award a fill at the earlier close that generated the decision. The short rule mirrors this at the range low. The protective stop remains active while waiting for a close-based or time exit.
If a stop triggers before the failed-breakout exit can fill, the position closes once and the other exit must be canceled. A gap through the protective level can produce a worse fill than the stop price. If the next entry open already lies beyond the intended protective stop on the wrong side, cancel the entry and retain the used daily allowance.
One-minute OHLC bars do not show the full order of price movements inside a minute. Check how the engine handles an entry and a stop in the same bar, including gaps. Use finer execution data for ambiguous cases when available; record unresolved ambiguity rather than selecting the profitable sequence. A missing signal or exit bar invalidates the date even when the opening range is complete.
Translate ticks into the cost of a decision
CME specifies a $50 point multiplier and a 0.25-point outright tick worth $12.50 for ES. MES has a $5 point multiplier and a 0.25-point outright tick worth $1.25. CME ES tick specification, CME Micro E-mini specifications.
For an illustrative six-point distance from the planned entry price to the stop, one ES contract has $300 of price risk before costs: 6 × $50. Under the example assumptions, one tick of entry slippage plus one tick of exit slippage adds $25, and two $2.50 fees add $5. The modeled total is $330 if both fills slip by exactly that amount; a larger gap can increase the loss.
Calculate the stop distance from the actual fill, not only from the breakout boundary. A higher long fill increases the distance to the frozen low. If you later test MES, use its own history and fee assumptions; changing the multiplier alone does not establish identical execution.
Inspect trade days and no-trade days
Before judging the equity curve, use the trade log and chart to check these cases:
- A breakout entry: the range ends at 09:45, the signal uses a later completed bar, and the fill follows the signal.
- A false breakout: the close returns inside, the exit timing follows the rule, and a later opposite breakout does not create another entry.
- A valid no-trade day: all required bars are present, but neither completed-close trigger qualifies before the cutoff.
- A day with unusable data: a missing range or exit bar is identified separately from valid no-trade days.
- Consecutive dates: today’s range and allowance reset without carrying yesterday’s levels or permitting an extra trade.
Count eligible dates alongside trades. A strategy with ten trades in ten sessions tells a different story from ten trades across sixty eligible sessions. Examine net profit, drawdown, and the size of losing trades after costs; a high win rate alone does not describe the risk.
For a longer study, specify contract selection and rollover before joining histories. CME publishes customary equity-index roll dates and notes that participants can roll at a time they choose. A continuous series is a data construction: save its roll and adjustment convention, and verify that displayed levels and simulated fills use compatible prices. CME equity-index roll guidance.
Keep this rule set fixed while extending to a separate historical window. Changing the range length, exit time, and stop after each disappointing result creates a new experiment and needs a fresh evaluation.
Explore Stratifyre backtesting to translate your own opening-range rules and inspect whether the resulting entries match the setup you intended.
Put your strategy rules to the test
Build your strategy, inspect historical trades, and review the assumptions behind your results.
Build and test your strategy

