Gap and go trading strategy: continuation vs gap fill

A gap and go trading strategy trades in the direction of an opening gap after a defined continuation trigger. A gap fill strategy trades toward the previous session close. The gap alone cannot choose between them: specify the reference session, confirmation, invalidation and exit before testing either approach.

Draft a gap strategy with AI Coding Agent

Key Takeaways

  • Measure the overnight gap from the previous regular-session close to the current regular-session open.
  • Compare opening volume with the same opening window on earlier sessions, not with their full-day volume.
  • Continuation and gap fill are separate hypotheses. A failed continuation trade is not automatically a reversal entry.
  • Record session selection, corporate-action adjustments, commission and opening slippage with every test.

Define the overnight gap before looking for an entry

Gap percent = 100 × (current regular-session open − previous regular-session close) / previous regular-session close. A hypothetical close of $100 and open of $102 produce a +2% gap. A return to $100 is a full fill under this definition; a move to $101 is a partial fill. State whether a touch or a close at the reference counts. This close-to-open measurement can exist even when two daily candle ranges overlap. TradingView's built-in Gaps indicator instead identifies non-overlapping ranges between adjacent bars. Its highlighted zones therefore need not match a list of overnight gaps. Do not mix those definitions in one test.

Continuation and gap fill require different evidence

Use the following comparison to specify two experiments. It describes possible rules, not a forecast. Labels such as breakaway or exhaustion do not supply an entry price, and assigning them after the next move introduces hindsight.

Illustrative choices after a gap up
DecisionGap and goGap fill
HypothesisPrice continues above the opening areaPrice returns toward the previous regular close
Possible triggerA completed bar closes above the first five-minute highA completed bar closes below the first five-minute low
InvalidationA protective stop below the opening range lowA protective stop above the opening range high
Exit referenceA preselected risk multiple or time exitPrevious regular close, provided the target remains below entry
Failure caseBreakout reverses before reaching the targetSelling stalls and the gap resumes upward

A gap and go rule set to test

This hypothetical long-only specification uses five-minute US equity bars during a normal 09:30 to 16:00 America/New_York session. The thresholds are research inputs, not recommended or proven settings. Exclude shortened sessions from this first experiment and handle them separately. Unlike a general opening range breakout, this setup requires a positive overnight gap and permits only a trade in its direction. For a gap-down version, reverse the price conditions and test it separately with short-sale availability and borrowing costs.

  • Eligibility: regular-session open is at least 1% above the previous regular close. Skip missing reference data and flagged split or ex-dividend sessions in this initial test.
  • Opening volume: require the completed 09:30 to 09:35 bar volume to be at least 1.5 times the mean for that same window over the previous 20 full regular sessions with valid data. Skip an incomplete baseline.
  • Trigger: after 09:35 and before 10:30, take the first completed bar close above the first five-minute high. Model a market entry on the next available tick, not at the earlier breakout level.
  • Cancellation: cancel the setup if a completed bar closes below the session open before a valid trigger. Allow at most one entry per session; no automatic reversal after a loss.
  • Exit: fix the protective stop one minimum tick below the first five-minute low. Target twice the distance from actual entry to that stop. Submit a time exit at 15:55 if still open; record its actual fill.
  • Sizing: set a loss budget and maximum position value before testing. A stop defines planned risk; slippage, gaps or a halt can make the realized loss larger.

Work through the prices before coding

Illustrative prices, not a historical trade: yesterday closes at $100; today opens at $102. The first five-minute bar has a $102.60 high and $101.80 low. Its 180,000 shares compare with a 100,000-share mean for the same window, giving relative opening volume of 1.8. Both the 1% gap threshold and 1.5 volume threshold pass. A later bar closes at $102.70 without an earlier cancellation. Assume the next available fill is $102.75 and the minimum tick is $0.01. The stop is $101.79, initial price risk is $0.96 per share, and a 2R target is $104.67 before costs. Those are order levels, not evidence that the target will trade. A continuation stop can be hit while most of the original gap remains unfilled. A separate gap fill test would need its own downward trigger and a target at $100. Do not switch to that target merely because the long trade lost. Compare the two rule sets on the same dates with their own costs and trade counts.

Opening volume and premarket volume answer different questions

Use comparable windows. A 09:30 to 09:35 volume filter measures participation after the regular open. A premarket filter needs a separately fixed window and a baseline for that window. Comparing five minutes today with a prior full day changes the meaning of the ratio. Never use today's completed daily volume to qualify a morning entry. Premarket highs can be another trigger reference, but adding one changes this specification. Freeze that high at the regular open and record the feed and available premarket history. The SEC notes that extended-hours trading can have less liquidity, greater price volatility and prices that differ from the following regular session. A premarket print is not a promise of an opening fill.

Keep session and adjustment settings consistent

The previous chart bar may be a premarket bar rather than yesterday's regular close. Store an explicit regular-session reference and verify it on sample dates. TradingView distinguishes named sessions; for some futures, the default regular session is the longer electronic session. Do not transfer a stock-session rule to futures without checking the symbol's session definition. TradingView dividend adjustment produces a total-return price series. Record whether it is enabled. A test that mixes adjusted historical references with unadjusted prices can change which gaps qualify. Inspect split and ex-dividend dates, decide whether to exclude them, and use consistent prices on both sides of the comparison. The example above excludes those sessions; it does not infer a news-driven gap from every price discontinuity.

Check fills and opening costs before optimizing

TradingView strategies normally calculate after a bar closes and fill market orders on the next available tick, often the next bar open. A price-based order crossed in an interbar gap can fill at the next open instead of its requested level. Use standard candles and inspect bars where both stop and target are reachable: the assumed intrabar path can affect the result. Include commission and run several opening-slippage assumptions. A fixed slippage setting cannot reproduce every spread, partial fill or halt. Keep those limitations beside the results. Test candidate parameters on a later period that was not used to select them, and report trade counts and drawdown alongside net profit. This page provides no measured win rate or universal gap fill probability.

Pineify next step

Turn the gap rules into a strategy you can inspect

Give Pine Script AI Coding Agent the session, gap reference, volume window, cancellation and exit rules to draft a strategy. Review its trades in TradingView before using Strategy Optimizer to compare selected input ranges. Keep opening-cost assumptions and a separate validation period in the experiment. These tools do not establish a trading edge or execute broker orders through this workflow.

Educational strategy research, not investment advice. All prices, thresholds and trade examples on this page are hypothetical. Backtests simulate orders and may not reflect opening spreads, liquidity or live execution. Trading can lose more than the planned stop amount; past results do not guarantee future performance.

Frequently Asked Questions