ORB rules and parameters: range length, entry, stop and exit
Before an opening range breakout can be tested, about ten choices have to be fixed: the session, the range length, the entry, the stop and the exit. A futures backtest of it is only useful when every rule is exact, the range follows the exchange clock, open-time slippage is charged, and nearby settings, other markets and unseen data are checked.
By Soren Huang · Published · updated · Editorial policy
Contents
- Which rules does an opening range breakout need?
- Which session open and how many minutes should the range cover?
- How do you write ORB entry, stop and exit rules a backtest can follow?
- How does daylight saving time break futures session data?
- How much do costs and slippage at the open matter?
- How do you test an opening range breakout honestly?
- Frequently asked questions
- References
Which rules does an opening range breakout need?
An ORB strategy only sounds simple: mark the high and low of the first minutes after a session opens, then enter when price trades beyond one side. To set its parameters on futures, write every rule exactly, anchor the range to the exchange's clock through daylight saving changes, charge open-time slippage, and check nearby range lengths, other markets and unseen data.
The opening range is the highest and lowest price traded during a set number of minutes after a chosen session open. A breakout is a trade that starts when price moves beyond that high or low. Taiwan traders call the idea 開盤區間突破. Many traders call it an ORB strategy.
The idea contains about ten hidden choices, and each one changes the trades. Two traders can both say "I trade the opening range breakout" and still hold opposite positions on the same morning. A backtest can only test one exact version. So the first job is to write that version down.
Which session open and how many minutes should the range cover?
Anchor the range to the open where trading activity really starts, and choose a length that your bar size divides exactly. Futures often trade almost around the clock, so "the open" is a choice, not a given.
Check the session times for your market in the futures market hours tool, which shows them in your own time zone. Exchanges can change session times and contract details, so confirm them on the exchange's contract page before you build a test.
| Market | Exchange session | Common range anchor |
|---|---|---|
| E-mini S&P 500 (ES), E-mini Nasdaq-100 (NQ) | CME Globex, Sunday to Friday, 17:00 to 16:00 Central Time, with a daily break from 16:00 to 17:00 CT | US cash market open, 9:30 New York time (8:30 CT) |
| TAIEX futures (TX) | Day session 8:45 to 13:45 Taipei time; night session 15:00 to 05:00 the next day | Futures day open at 8:45, or the Taiwan stock market open at 9:00 |
For ES and NQ, most opening range traders use the 9:30 New York cash open, not the Globex open. Volume rises sharply when US stocks start trading. For TAIEX futures, the first 15 minutes trade before the stock market opens. That is why 8:45 and 9:00 give two different ranges. Test both as separate variants and decide before you look at the results.
Range length is a trade-off, and the table shows how it usually plays out.
| Range length | What changes |
|---|---|
| 5 minutes | Narrow range, many breakout days, more false breaks, small stop distance |
| 15 minutes | A common middle choice; the range includes the first burst of activity |
| 30 minutes | Wider range, fewer trades, larger stop distance per contract |
| 60 minutes | Few breakouts, and they come later in the day, so less time is left before the exit |
The bar size must divide the range length. A 15-minute range needs 1-, 3-, 5- or 15-minute bars that start exactly at the open. With 37-minute bars, no bar ends at the end of the range, and the range is not what you meant.
How do you write ORB entry, stop and exit rules a backtest can follow?
Write each rule so that two people given the same data would produce the same list of trades. Every blank you leave, the backtest fills with a default, and that default may not be what you would do live. Each of those fixed choices becomes an entry or exit condition in the strategy generation of AlphaPrime (Valynox), and the range length can be given a parameter range.
| Decision | One exact version |
|---|---|
| Range | High and low of 5-minute bars from 9:30 to 9:45 New York time |
| Entry | Buy stop one tick above the range high; sell stop one tick below the range low |
| Trades per day | One. The first fill cancels the other order |
| Entry cut-off | Cancel unfilled orders at 11:00 |
| Stop | Range midpoint (other choices: the opposite side of the range, or a multiple of ATR) |
| Target | None, or a fixed multiple of the range height |
| Time exit | Close any open position at 15:55, before the cash close |
| Skip rule | No trade if the range is wider than a set number of points |
Two situations break most first drafts, so give each one its own rule:
- Price gaps through the order. If the first bar after the range opens above the buy stop, a real stop order fills near that bar's open, not at the trigger. Fill the backtest at the worse of the two prices.
- Entry and stop in the same bar. If one bar touches both the entry and the stop, a bar backtest cannot know which came first. Either assume the stop came first, or test on 1-minute bars so this case is rare.
The range also must be complete before any order exists. The entry orders go in only after the last range bar has closed. If a rule uses a bar's high before that bar has finished, the backtest has a leak. A one-bar check for look-ahead bias finds it quickly.
How does daylight saving time break futures session data?
Store and test your data in the exchange's own time zone, because a fixed local clock time moves the range by one hour for part of every year. Daylight saving time is the seasonal one-hour clock shift that the United States and Europe use and Taiwan does not.
The US cash open is always 9:30 New York time. In Taipei time it is 21:30 in summer and 22:30 in winter. If your bars carry Taipei timestamps and your rule says "range from 21:30 to 21:45", then in winter your range covers 15 quiet minutes about an hour before the open. The strategy then trades a different idea for months at a time.
The US and Europe also change their clocks on different dates: the US on the second Sunday of March and the first Sunday of November, Europe on the last Sundays of March and October. For a few weeks each year, the gap between New York and London is one hour smaller than usual. This matters if your rules mix the two markets' times.
Run this check on any intraday data before you test a session rule:
- Find out which time zone your data vendor uses for the timestamps.
- Average the volume of each bar by time of day, separately for summer and winter months.
- The volume jump at the open should sit at the same exchange-time bar in both seasons.
- If it moves by one hour, convert the timestamps to exchange time, or define the session in exchange time in your backtest.
How much do costs and slippage at the open matter?
For an opening range breakout, slippage is often the largest cost, because the strategy enters with stop orders in the busiest and fastest minutes of the day. Slippage is the difference between the price a backtest assumes and the price a real order gets.
A breakout entry buys when price is already moving up, so the fill usually lands a tick or more beyond the trigger. The general method for adding commission and slippage is explained in trading costs in backtests. For an ORB strategy, charge more slippage on the entry than on the time exit, and then run the whole test again with the slippage doubled.
Hypothetical example
On ES, the 9:30 to 9:45 range has a high of 5,012.00 and a low of 5,000.00. The buy stop sits at 5,012.25 and the stop at the midpoint, 5,006.00. One ES tick is 0.25 points and worth $12.50, so the risk per contract is 25 ticks, or $312.50, before slippage.
Assume $5 commission and fees per round trip, 2 ticks of slippage on the entry and 1 tick on the exit. Costs per trade are $5 + 3 × $12.50 = $42.50.
| Per trade | Normal slippage | Slippage doubled |
|---|---|---|
| Gross average trade | $60.00 | $60.00 |
| Commission and fees | −$5.00 | −$5.00 |
| Slippage | −$37.50 | −$75.00 |
| Net average trade | $17.50 | −$20.00 |
This version depends on cheap fills. A version that only survives normal slippage has a thin edge per trade.
How do you test an opening range breakout honestly?
A result you can trust holds up when you change the range length slightly, when you move the rules to another market, and on data the rules never saw. Opening range ideas are easy to over-tune. With only a few rules, you can still try hundreds of combinations of range length, stop, cut-off and filter in an afternoon.
Researchers have shown that testing many technical trading rules on the same data makes the best one look better than it is (Sullivan, Timmermann & White, 1999). The more variants you try, the higher the best backtest climbs by luck alone (Bailey, Borwein, López de Prado & Zhu, 2014). Use these checks in this order:
- Nearby range lengths. If 15 minutes works, test 10, 20 and 30 with every other rule unchanged. A good sign is a plateau, where neighbouring lengths all give similar results. A bad sign is a spike, where only one length works.
- Other markets, no re-tuning. Run the exact rules on NQ or on TAIEX futures, with each market's own open and costs. Some decline is normal. A complete collapse suggests the rules fit one market's history.
- Out-of-sample data. Out-of-sample data is the part of history you keep aside and do not use while you build the rules. Fix the rules first, then run them once on that data.
- Walk-forward analysis. Re-choose the range length on a rolling window and trade it forward, as described in walk-forward analysis.
- Count your variants. Write down how many versions you tried. Judge the winner against that number, not on its own.
In AlphaPrime, you set trading sessions, fees and slippage in the backtesting settings, and backtesting always uses next-bar execution. Every candidate is then judged with the same cost and timing rules. You can then run Basic, Standard or Extensive validation, including walk-forward analysis, with your own thresholds in strategy validation.
What this means if you use AlphaPrime: define the session in exchange time and include open-time slippage before the first run, so that the parameter ranges you search already reflect fills you could get. Then use validation on neighbouring settings and unseen data before you treat any opening range version as a candidate.
Frequently asked questions
What is the best opening range length for futures?
No single length is best for every market. Common choices are 5, 15, 30 and 60 minutes after the open. Pick a length for a reason, then check that the nearby lengths give similar results, because a result that only works at one exact length is usually fitted to the past.
Can you backtest an opening range breakout on TAIEX futures (台指期)?
Yes. The day session opens at 8:45 Taipei time and the stock market opens at 9:00, so decide which open your range uses and treat the two as separate variants. Taiwan does not use daylight saving time, so the clock time stays the same all year.
Should the ORB stop go at the other side of the range?
That is one common choice, alongside the range midpoint or a multiple of ATR. A stop at the opposite side gives the trade more room but risks more per contract on wide-range days. Write the stop as one exact rule, test it, and then test the alternatives as separate variants that you count.
Why do my opening range backtest results change in March and November?
Your data timestamps are probably in a local time zone without daylight saving time, so the US open moves by one hour when US clocks change. For part of the year your range then covers the wrong hour. Convert the timestamps to exchange time, or define the session in exchange time.
References
- Sullivan, R., Timmermann, A., & White, H. (1999). Data-Snooping, Technical Trading Rule Performance, and the Bootstrap. The Journal of Finance, 54(5), 1647–1691.
- Bailey, D. H., Borwein, J., López de Prado, M., & Zhu, Q. J. (2014). Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance. Notices of the American Mathematical Society, 61(5), 458–471.

