Opening gap is the gate for "only trade on a day that opened away from yesterday's close". It works the same way in Backtest and in the Bot.
What it measures
The gap is today's opening price minus the previous day's closing price. Today is the futures trading day, which opens at 5pm Chicago time when the futures exchange (CME) reopens. On a Monday, the previous day is Friday.
What you set
- Smallest gap, in ticks. The gap must be at least this many ticks. It must be above zero.
- Direction. Which way the gap must go:
- Up: today opened above the previous close. - Down: today opened below it. - Either: up or down. - With the trade: up for a long, down for a short. - Against the trade: down for a long, up for a short.
Both are yours to set. Neither has a value until you type one.
A session of your own
You can measure the gap on a session you choose instead of the trading day. Pick a clock, today's open time and the previous day's close time. For the stock market's hours, that is the 4:00pm close to the 9:30am open, New York time. The gap is then the open at your time against the close at your time the day before. Leave it empty to use the trading day.
When it blocks
- The gap is smaller than your number, or goes the other way.
- There is no previous close yet, for example on the first day of a backtest. Every entry waits until there is one.
- A setting is missing. The builder flags it before you save. A strategy that reaches the Bot with one missing takes no trades, rather than trading without the rule you asked for.
Where you see it working
On the Everything else tab of Activity. When the gate refuses an entry, it says why there.
On your chart
Your strategy's chart uses this filter too, and so does the script you copy to TradingView or another platform. Both only mark setups on days the gap allows. With a session of your own, both times must fall at the start of a candle on your chart. A time in the middle of a candle won't work.
What can go wrong
The gap is measured once, at the open. A day that opens with a gap and then fills it straight away still counts as a gap day.