Fair Value Gap Strategy with Break of Structure Confirmation by AIScripts
By AIScripts
Performance Metrics
- Author: AIScripts
- Symbol: NYSE:CRCL
- Timeframe: 3 hours
- Win Rate: 45.6%
- Profit Factor: 1.305
Description
Description:Fair Value Gaps are one of the most discussed concepts in modern price action trading, and one of the most misunderstood. Most traders who learn about FVGs start marking every three-candle imbalance they can find and entering every time price returns to one. The results are typically poor — not because the concept is wrong, but because the context around the FVG determines almost everything about whether it will hold or fail.This strategy is built around one specific idea: a Fair Value Gap is only worth trading when it forms in the direction of a confirmed Break of Structure. Without that structural context, an FVG is just a gap in price — interesting, but not tradable on its own.What a Fair Value Gap actually isA Fair Value Gap forms when three consecutive candles create a price zone that the middle candle's body does not overlap. Specifically: the high of the first candle is below the low of the third candle (bullish FVG), or the low of the first candle is above the high of the third candle (bearish FVG). The gap represents a price range where no two-way trading occurred — price moved through it so quickly, driven by aggressive one-directional orders, that the normal auction process was bypassed. When price returns to that zone, the institutional logic is that unfilled orders from the original move are still resting there, creating a reaction point.The reason most traders misuse FVGs is that they treat them as generic support and resistance. They are not. An FVG formed during a weak, low-conviction move in a choppy market has almost no institutional significance. An FVG formed during an aggressive displacement move that also breaks market structure, that is a different animal entirely.What a Break of Structure isBreak of Structure (BOS) is the confirmation that the current swing direction has been validated by price taking out the most recent swing high (in an uptrend) or swing low (in a downtrend). In a series of higher highs and higher lows, each break above the prior swing high is a BOS confirming the uptrend. A BOS tells you the market is making a committed directional statement, not oscillating within a range.The reason BOS matters for FVG trading is displacement. An aggressive candle that creates a BOS almost always leaves a Fair Value Gap behind it, the candle moves so fast that a price imbalance forms in its wake. That FVG is structurally significant because it was created by the same momentum that just confirmed the trend direction. When price returns to fill that gap, it is returning to the exact zone where institutional momentum entered the market and structural commitment was made.How the strategy worksThe strategy identifies bullish FVGs formed during upward BOS moves and bearish FVGs formed during downward BOS moves. A bullish FVG entry fires when price retraces into the gap after a confirmed bullish BOS, the high of candle one is plotted as the upper boundary, and price closing back inside that zone triggers the long entry. The stop is placed below the low of the FVG zone. The target is set at a 2x ATR multiple from the entry, scaled to current volatility rather than a fixed distance.The BOS confirmation uses swing high and swing low detection with a defined lookback period. Only FVGs that form within a specified number of bars after a BOS are considered valid, older gaps that formed long before the most recent structural move are not traded, since the institutional orders that created them have likely already been filled or cancelled.Why FVGs fail and how this addresses itThe most common failure mode for FVG strategies is trading imbalances in ranging, low-conviction markets where no structural context exists. The BOS filter directly addresses this by requiring that a swing high or low has been broken with enough conviction to register a structural shift before any FVG is considered valid. The second most common failure is holding positions through the entire FVG zone hoping for a reversal, this strategy enters at the gap boundary and exits at a defined ATR target rather than waiting for a full reversal, which keeps the average trade duration shorter and reduces exposure to the next structural shift invalidating the position.What to examine in backtestingFVG strategies are particularly sensitive to the lookback period used for swing detection and the maximum bar age allowed for a gap to remain valid. Shorter lookbacks detect more swing points and more FVGs but include lower-quality setups. Longer lookbacks produce fewer, higher-conviction structural shifts but generate fewer trades, which makes backtesting more difficult due to small sample sizes. Run the strategy across at least 200 completed trades before drawing any performance conclusions, and test separately across trending and ranging market environments. FVGs in ranging markets without genuine displacement will produce consistently poor results regardless of parameter tuning, this is expected behavior, not a failure of the strategy.Shared for educational purposes and community discussion. This is not investment advice. Always backtest on your own instruments and timeframes with realistic commission assumptions before evaluating performance.