Free trial
Menu
Strategy guide

Understand Rule-Based Gap Trading

A gap happens when a market opens well above or below its previous close. Gaps reflect news, results or global moves that happened while the market was closed. A gap trading strategy either trades in the direction of the gap, expecting it to continue, or against it, expecting the price to move back and "fill" the gap.

QuantPower Research · Updated 6 Nov 2026 · 4 min read

This guide explains how gaps form in Indian markets, the main gap strategies, the rules, worked examples and how to automate and test gap trades.

At a glance

Gap trading
StyleIntraday, at the open
InstrumentsLiquid stocks, index futures
MeasureGap size as a percentage of the previous close, or in multiples of ATR
StrategiesGap and go (continuation), gap fill (fade)
ExitA stop, a target at the previous close, or a time exit

How gaps form

Markets are closed overnight, but news is not. Company results, global markets, policy announcements and events abroad can change what buyers and sellers will pay. On NSE, the pre-open session from 9:00 to 9:15 am collects orders and sets the opening price for stocks. When that price is far from the previous close, the market gaps.

A gap is usually measured as:

Gap % = (open − previous close) ÷ previous close × 100

Many traders also measure it in multiples of ATR, so a 1% gap in a calm stock counts for more than a 1% gap in a volatile one.

Types of gaps

  • Common gaps: small gaps without major news. They often fill during the day.
  • Breakaway gaps: gaps out of a range on important news, often on heavy volume. They can start a new trend.
  • Exhaustion gaps: gaps late in a long move that soon reverse.

These labels are easier to apply in hindsight than in real time, which is why rule-based strategies use measurable conditions instead.

Strategy 1: Gap and go

Trade in the direction of a gap that holds.

  1. Setup: the stock opens at least 2% above the previous close, on news or with high pre-open volume.
  2. Trigger: the price breaks above the high of the first 5 or 15 minutes.
  3. Entry: buy at the next price.
  4. Stop: below the low of the first 15 minutes.
  5. Exit: a trailing stop, or close the position by 3:15 pm.

Strategy 2: Gap fill

Trade against a gap that looks overdone.

  1. Setup: the stock opens 1% to 3% above the previous close without major news.
  2. Trigger: the price fails to make a new high in the first 15 to 30 minutes and breaks below the opening range low.
  3. Entry: sell at the next price.
  4. Target: the previous day's close, where the gap would be filled.
  5. Stop: above the day's high.
  6. Time exit: close the position by a set time if the gap has not filled.

A worked example: gap fill

This is a hypothetical example, not a result.

  • A stock closed at ₹600 yesterday. It opens today at ₹612, a gap of 2%, with no company news.
  • In the first 30 minutes it trades between ₹608 and ₹616 and makes no new high.
  • At 9:50 am, a candle closes at ₹607, below the opening range low.
  • The algo sells 200 shares at ₹606 with a stop above the day's high at ₹617, a risk of 200 × ₹11 = ₹2,200.
  • The target is the previous close of ₹600, a gain of 200 × ₹6 = ₹1,200 if reached.

The reward is smaller than the risk here, so this version needs a high success rate to pay. Many traders improve the ratio by using a closer stop, such as above the opening range high.

Gap fill rules: a gap up from ₹600 to ₹612, no new high in 30 minutes, sell ₹606 after a close below that range, stop ₹617, target ₹600 (illustration)

Gap trading in index futures

Nifty and Bank Nifty futures also gap, often because of overnight moves in global markets. Index gaps tend to be smaller in percentage terms than stock gaps, and large index gaps usually follow major events. The opening range breakout is often used alongside gap rules on index futures.

Risks

  • News gaps can keep going. A gap on results or a major event can trend all day. Gap-fill trades against news are the most dangerous.
  • Liquidity at the open. Spreads can be wide in the first minutes, so fills may slip.
  • Short selling limits. Intraday short sales of stocks must be closed the same day.

Automating gap trades

Gap strategies act in the first minutes of the day, when prices move fastest. Automation calculates the gap, applies the filters and enters on the trigger without delay. QuantPower's strategy builder lets you set time windows, price conditions, stops, targets and time exits. Test your rules in the backtesting engine and paper trading first.

Start your free trial

Connect your broker, build a strategy and test it on paper before a single live order goes out.

Backtesting tips

  • Use the real open, not the first candle's close.
  • Adjust for corporate actions. A split or bonus can look like a large gap.
  • Separate news and non-news gaps if you can, because they behave differently.
  • Include slippage at the open.

Frequently asked questions

Do gaps always fill?

No. Many small gaps fill on the same day, but gaps on major news can keep going for days or never fill.

What is a good gap size to trade?

It depends on the instrument. Many traders measure gaps in multiples of ATR, so the threshold adapts to how volatile the stock is.

Can I trade gaps in Nifty options?

Yes, using signals from Nifty futures. Option premiums at the open can also be affected by changes in implied volatility.

Sources

  • Murphy, J. J. (1999). Technical Analysis of the Financial Markets. New York Institute of Finance
  • NSE: Pre-open session, nseindia.com
The example on this page is hypothetical and for illustration. Trading involves substantial risk. This guide is for education and is not investment advice.