This guide explains how the ORB works on Nifty and Bank Nifty, the exact rules, a worked example, the main variations, when it works and when it fails, and how to automate and test it.
At a glance
| Opening range breakout | |
|---|---|
| Style | Intraday momentum |
| Instruments | Index futures, index options, liquid stocks |
| Timeframe | 5-minute candles, with a 15- or 30-minute opening range |
| Entry | A close above the range high, or below the range low |
| Stop | The other side of the range, or the middle of it |
| Exit | A target, a trailing stop or a fixed time |
How the opening range works
The market opens at 9:15 am. In the first minutes, overnight news, global cues and pending orders meet, and prices move quickly. The opening range is the high and low of that early period, usually the first 15 or 30 minutes.
If the price breaks out of that range with conviction, it suggests one side has taken control. The ORB trades in the direction of the break and uses the opposite side of the range as a natural stop.
The rules
- Mark the range. Record the high and low from 9:15 to 9:30 am.
- Wait for a close outside the range. A 5-minute candle must close above the high or below the low. A brief poke through the level is not enough.
- Enter at the next price. Buy after a close above the high; sell after a close below the low.
- Set the stop. Place it at the opposite side of the range, or at its midpoint for a tighter stop.
- Set the target. Use a multiple of the range width, such as 1.5 times, or a trailing stop.
- Limit the window. Only take breakouts before a set time, such as 11:00 am. Late breakouts often lack follow-through.
- Exit by a set time. Close any open position at 3:15 pm.
- One trade a day. If the first breakout fails, stop for the day.
A worked example on Nifty futures
This is a hypothetical example to show how the rules work, not a result.
- From 9:15 to 9:30 am, Nifty futures trade between 25,010 and 25,070. The range is 60 points.
- At 9:45 am, a 5-minute candle closes at 25,078, above the range high.
- The next candle opens at 25,080. The algo buys one lot of 65 there.
- The stop is at the range low, 25,010, which is 70 points away. The risk is 70 × 65 = ₹4,550 per lot, before costs.
- The target is 1.5 times the range, or 90 points above the range high: 25,160. That is 80 points from entry, or ₹5,200 per lot.
If the price reaches 25,160 first, the trade makes about ₹5,200 before costs. If it falls back to 25,010 first, it loses about ₹4,550. If neither happens, the position closes at 3:15 pm.
Variations
Range length
A 15-minute range is narrower, gives earlier signals and more false breaks. A 30-minute range is wider, gives fewer but often cleaner signals, and needs a wider stop.
Stop placement
A stop at the far side of the range gives the trade room but risks more. A stop at the midpoint risks less but is hit more often. Some traders use a fixed multiple of ATR instead; see the ATR volatility strategy.
Filters
- Gap filter: skip days when the market opens with a very large gap, which can exhaust the move early.
- Range filter: skip days when the opening range is unusually wide, because the stop would be too large.
- VWAP filter: take long breakouts only above VWAP and short breakouts only below it. See the VWAP strategy.
- Volume filter: require higher volume on the breakout candle. See the volume breakout strategy.
Options instead of futures
Instead of futures, the algo can buy an at-the-money call on an upside break or a put on a downside break. The loss is limited to the premium, but time decay and changes in IV affect the result, and a slow breakout can lose money even if the direction is right. See the option buying strategy.
When the ORB works, and when it fails
Works best when:
- News or global cues create a clear direction early in the day.
- The breakout comes with strong participation.
- The market trends for the rest of the session.
Struggles when:
- The market spends the day in a range and breaks out in both directions.
- A large gap at the open has already done most of the day's move.
- Breakouts come late in the morning and fade into the afternoon.
Range-bound days are the main enemy. On those days the ORB tends to buy near the top and sell near the bottom, then get stopped out.
Position sizing
Because the stop is set by the range, the risk per lot changes every day. Size each trade by the loss you can accept. If your limit is ₹5,000 and the stop is 70 points away on a lot of 65, the risk is ₹4,550, so one lot fits. If the range is 120 points wide, the risk per lot is about ₹7,800, and the rule says skip or reduce size. The position size calculator does this sum for you.
Automating the ORB
The ORB is easy to describe but hard to trade by hand: you must mark the range precisely, watch for a candle close, enter immediately and manage the stop all day. Automation does all of that consistently.
QuantPower's strategy builder lets you set the range window, the candle size, the entry conditions, the stop and target, the time window and the daily limit. You can also use indicator conditions as filters. Test the rules in the backtesting engine, then run them in paper trading before deploying them as a bot.
Start your free trial
Connect your broker, build a strategy and test it on paper before a single live order goes out.
Backtesting the ORB
- Use intraday data fine enough to know whether the stop or the target was hit first.
- Fill at the next price after the signal candle closes, not at the breakout level.
- Test neighbouring settings: 15 and 30-minute ranges, stops at the far side and the midpoint, targets of 1 to 2 times the range.
- Count every cost, since the strategy trades most days.
- Check by year and by market type. The ORB's results often depend on how much the market trended in a given period.
Our guide on how to backtest trading strategies covers each of these.
Common ORB mistakes
- Entering on a touch instead of a close outside the range.
- Taking every breakout, including late ones with little time left.
- Using the same size regardless of how wide the range is.
- Re-entering after a failed breakout and doubling the day's loss.
- Ignoring gaps, which change how the opening range behaves.
Frequently asked questions
What is the best opening range for Nifty?
Traders commonly use 15 or 30 minutes. Test both on your instrument; the best choice depends on your stop rules and filters.
Does the ORB work on Bank Nifty?
Yes. Bank Nifty's larger moves suit breakout strategies, but its ranges and stops are also larger, so size accordingly.
Should I trade the ORB with futures or options?
Futures give a direct exposure with a stop loss. Options limit the loss to the premium but add time decay and volatility effects. Test both.
How many trades does the ORB take?
Usually at most one a day, which means around 240 trading days a year at most, and fewer after filters.
Sources
- Crabel, T. (1990). Day Trading with Short Term Price Patterns and Opening Range Breakout. Traders Press
- NSE: Equity derivatives contract specifications
