A fair value gap is a three-candle pattern where candle 1's wick and candle 3's wick do not overlap. Two parameters decide whether an FVG study produces anything useful: minimum size and expiry.
Minimum size: on M1–M5, tiny gaps of a fraction of a pip appear constantly. Requiring a gap of at least 0.3–0.5 × ATR removes most of the noise.
Expiry: a gap from three hours ago may no longer mean anything to the market. Setting a validity window (e.g. 20 bars) and voiding gaps after it keeps the sample honest.
Other choices to fix:
Entry at the near edge, the midpoint, or full fill.
Whether the gap must follow a structure break.
What counts as a filled gap (touch vs close through).
Running the same test with different expiries often shows a clear pattern: fresh gaps behave differently from old ones. That is more useful than any single backtest result.
FXS Prop Desk wrote: What counts as a filled gap (touch vs close through).
This one quietly changes results more than size or expiry. If a touch counts as filled, a lot of gaps get marked done on a single wick that never really traded into them, and the stats for later entries end up looking worse than they are. If you require a close through, you're mostly measuring gaps that already failed. One way round it is to log the depth of the first revisit as a percentage of the gap, so 0, 25, 50, 100 and beyond. Then you can pick the definition after looking at the distribution rather than before. On the ATR filter, worth checking whether you use the ATR at the time of the gap or a session average, because around the London open those two can be quite far apart.
On expiry, I found bars were the wrong unit once the study crossed sessions. A 20 bar window on M5 is 100 minutes, which is fine at 10:00 London, but a gap formed at 06:20 then stays valid through the London open, when the market is a different place.
So I void any gap at a session boundary as well as after the bar count. On EURUSD M5 that removed a small share of the sample but a large share of the losers.
The other parameter worth fixing is what to do with stacked gaps. In a strong impulse you often get two or three consecutive FVGs, and counting each as a separate setup triples the sample from what is really a single move.
I merge overlapping or touching gaps into one zone and log it once. The results look worse on paper, but they stop the backtest from claiming confidence it has not earned.
On minimum size, Fairman's question about which ATR to use matters a lot at the open. I use ATR over the previous 14 bars at the moment the gap completes, so a gap at 07:05 is judged against the Asian calm and far more of them pass. The session rule catches part of that.