Why usFeaturesTemplatesBlogGlossary

Intraday Gap Continuation (Open to Close)

An intraday strategy on daily bars. Every morning it buys the 10 liquid large caps that closed strongest on above-average delivery the previous session, and squares the entire book off before that same day's close. No position ever survives the session.

Why this is expected to work

This template exists as much to demonstrate honest intraday accounting as to propose an edge. The signal is short-horizon continuation: a session that closes near its high on genuine delivery reflects buying that ran out of session, not out of demand, and Indian large caps show measurable open-to-close persistence the morning after. Be sceptical of the headline number here more than anywhere else in the catalog. Intraday strategies trade roughly 250 times a year instead of 12, so costs that round to nothing in a monthly template dominate the result, and the edge per trade is a few dozen basis points at best. Run it, then run it again with slippage doubled; if the second run is unprofitable the first was a cost assumption, not a strategy. The reason it is worth having is structural: a book that never holds overnight carries no gap risk, which is a genuinely different risk profile from everything else here.

intradayno-overnight-riskdaily
Universe
NSE Stocks XNSE
Rebalance
Daily Equal weighted

How the pipeline works

Filter

NIFTY100 constituent

Keeps rows where nifty100_member == 1

nifty100_member == 1
Filter

Liquid: traded > Rs 25 cr/day

Keeps rows where turnover > 250000000

turnover > 250000000
Calculate

Close position within the day's range

Computes close_strength = (close - low) / (high - low)

(close - low) / (high - low)
Filter

Closed in the top quarter of its range

Keeps rows where close_strength > 0.75

close_strength > 0.75
Filter

Delivery-backed

Keeps rows where delivery_pct > 45

delivery_pct > 45
Rank

10 strongest closes

Selects the top 10 by close_strength

What this template teaches

  • strategy_type=intraday — automatic session square-off
  • Daily-bar intraday: enter at the open, exit at the close
  • Why next_bar_open is mandatory for intraday
  • Cost sensitivity at high turnover
Read the full write-up

Backtesting an Intraday Strategy Honestly (and Why Costs Decide It)

An intraday strategy trades roughly 250 times a year instead of 12. Costs that round to nothing in a monthly backtest become the whole result. Here is how to build one so the backtest is not lying to you.