Skip to content

Gap

Indicators · Price Action

Gap node on the canvas

This bar opens beyond the prior close — gap up (open > prior close) or gap down (open < prior close). Set a minimum gap size in percent of the prior close (0 = any gap). Common on stocks/crypto session opens.

Gap fires when a bar opens beyond the prior bar's close — a gap up (open above the prior close) or a gap down (open below it). Gaps are common at stock and crypto session opens and after news, and they often mark momentum or a level worth fading. You get two signals plus a minimum-size filter.

How it works

From the bars input it compares this bar's open to the prior close. Gap up fires when open > prior close; gap down when open < prior close. The min_gap_pct parameter sets the smallest gap that counts, as a percent of the prior close — set it to 0 to catch any gap, or higher (e.g. 0.5) to only flag meaningful ones and ignore tiny opening ticks. Lookahead-free.

When to use it

Use it on instruments that actually gap — stocks across the daily open, crypto across weekend/session boundaries, anything after a data release. Trade the continuation (gap-and-go) or the reversion (gap-fill), and use min_gap_pct to filter out noise-sized gaps that aren't tradeable.

Example

Gap on the EURUSD H1 chart

Gap on EURUSD · H1

Gap-up continuation: on a daily chart, wire bars into Gap with min_gap_pct = 1.0, then And the gap_up signal with a strong opening bar to trade the follow-through. Backtest in the Tester.

Tips & gotchas

  • min_gap_pct is a percent of the prior close — 0 catches every gap; raise it to filter noise.
  • Timeframe-dependent — meaningful mostly where the market is closed between bars (daily stocks, session boundaries); 24h intraday FX rarely gaps.
  • Two outputs — gap_up and gap_down.

Inputs

Socket Type What to wire in
Bars bars Price bars.

Outputs

Output Type Plots as Description
Gap ↑ signal Signal arrows Open gaps above the prior close.
Gap ↓ signal Signal arrows Open gaps below the prior close.

Parameters

Parameter Type Default What it does
Min gap (%) number · 0.0–100.0 0.0 Minimum gap size, percent of prior close. 0 = any gap.

Reference auto-generated from the block catalog · category Indicators.