Gap up and gap down
A gap is the distance between today's open and yesterday's close. A gap up opens above the previous session's high and a gap down below its low, and the gap percentage is that distance as a share of the prior close.
There is no separate gap field, because a gap is two fields the language already has: today's `open` and yesterday's `close`, `high` or `low`. The strict definition of a full gap is an open above the previous session's entire range, `open > high[-1]`, or below it, `open < low[-1]`. The percentage form compares the open to the prior close. `open > close[-1] * 1.02` is a gap of more than 2%, and `open < close[-1] * 0.98` its mirror. Both are computed from adjusted prices, so a bonus or split does not appear as a gap.
On NSE daily bars a gap is overnight information being priced in one print: a result, a block deal, a global move, an order in the pre-open auction. The scan-worthy question is never the gap itself but what the session did with it, which is why every gap scan in the library carries a close condition. `open > high[-1] and close > open` is a gap up that held, with the buyers who paid up reinforced. `open < low[-1] and close < open` is a gap down that ran. The Gap down bought back scan asks the opposite of a down gap: opened 2% in the hole and closed green from the open.
The failure mode is treating the size of a gap as a signal. Large gaps on results are routinely faded, and a 4% gap that closes back inside the prior day's range is a trap for whoever chased the open. Gaps also cluster around known dates, results and ex-dividend and index rebalances, where they mean less than the same gap on an ordinary day. A relative-volume condition helps separate a gap the market participated in from one it stepped around.
The siblings are the range fields. `true_range` counts a gap as travel where the plain high-low range does not, so a gap day that then traded quietly still registers as volatile. Pair the two to find gaps that also expanded the session's range, which is the version most likely to be the start of something rather than a one-print adjustment.
In Sift
Written as open > high[-1] — a full gap up; open > close[-1] * 1.02 — a 2% gap. A working scan — Opened above yesterday's entire range and closed above the open:
where open > high[-1] and close > open1
of the 500 most-traded NSE stocks match today, as of 25 Sept 2026
Scans that use it
Prebuilt scans in the library whose query reads this value — each with a hit-rate replay over the last 250 sessions.
First up day after a selloff
Seven or more down days in the last ten, then a close above the previous day's high. The first session the sellers lost.
Candle between the 20 and 50
The whole candle body sits under the 20-day average and above the 50-day, with the 50 above the 200. A pullback that has broken nothing.
Open = Low (OHL buy)
The stock never traded below its open and closed up more than 1%. Buyers had it from the first print.
Open = High (OHL sell)
Never traded above its open, closed down more than 1%. Sellers ran the whole session.
Seven up days in ten
Seven of the last ten sessions closed above their open, in a stock above its 50-day with RSI under 70.
Gap up and hold
Opened above yesterday's high and closed above the open.
Gap down and fail
Opened below yesterday's low and closed below the open.
Gap down bought back
Opened more than 2% below yesterday's close and finished above the open. The morning panic found buyers.
Wide-body candle
A candle body more than twice its 20-day average on heavy volume, biggest body first.
Bullish outside bar
It swallowed yesterday's range and closed up.
Common questions
How do I write a gap-up scan in Sift?
Compare today's open with yesterday's prices using an offset: `open > high[-1]` is a full gap up, `open > close[-1] * 1.02` is a gap of more than 2% over the previous close. Add `close > open` to keep only gaps that held through the session, and `rel_volume > 1.5` to insist the gap had participation.
Is a gap up bullish?
Only if it holds. A gap up that closes above its open means the overnight buyers were reinforced during the session. One that fades back below the open, or into the previous day's range, trapped them, and is more often the start of a decline than a rally. The close decides what the gap meant.
Do gaps get filled?
Often, but on no schedule. Small gaps on ordinary days fill frequently, sometimes the same session; gaps on results or genuine news can stay open for months while the stock re-rates. A scan that conditions on the close and on volume separates the two populations.