When price moves fast enough, it leaves ranges behind where it barely traded. Plenty of traders believe price tends to come back to those gaps, and build entries, stops and targets around them. The Fair Value Gap node finds every gap as it forms, remembers it until price uses it up, and tells you where the nearest one is.
- Takes
- Nothing. It reads its series' candles
- Gives
- Whether price is inside a gap, and the nearest gap's edges, midpoint, age and count
- Reach for it
- Entries on a return to a gap, or stops and targets placed at one
What a fair value gap is
Look at three candles in a row. If the third candle's low is above the first candle's high, there's a band of prices in between that only the middle candle traded through. That band is a bullish fair value gap, usually the footprint of a strong rally. Flip it for a bearish gap: the third candle's high below the first candle's low.
Why care? The common reading is that the market moved through those prices too quickly to trade them fairly, so it tends to revisit them. Whether that holds for your market and timeframe is exactly the kind of thing a backtest should answer, rather than assume.
How AlgoLift keeps track
Each new gap goes into the node's memory as a zone with a top, a bottom and a midpoint. It stays there until it's mitigated, which is trading slang for used up, and you decide what that means:
| Mitigation | A gap is used up when |
|---|---|
| Full fill (default) | Price trades all the way through it |
| Body close | A candle's body closes beyond it (wicks don't count) |
| Wick touch | Price touches it at all |
Three more choices shape the memory. Dynamic shrinking narrows a gap as price eats into it, so its near edge moves and its far edge holds. Merge consecutive joins gaps from back-to-back bars into one zone. And the node only remembers so many: Tracked zones caps the unused gaps kept per side (five by default, oldest dropped first), and Max age retires a gap after a number of bars.
The outputs always describe the nearest active gap on each side, so a level you wire into an order points at the gap closest to price, not one from last week.
Example: buy the return to a bullish gap
You trade ES 5m and want to buy when price pulls back into a bullish gap, but only after the rally that made the gap really went somewhere. Stop just under the gap.
Set the node to Bullish gaps only, with a Min Gap of 1.5 points so the one-tick gaps don't count. Then wire two conditions into a Logic AND: Inside Bull FVG, and a Comparison checking Max Points Away (Bull) is greater than 8, which proves price ran at least 8 points before coming back. The AND feeds a long Entry.
For the stop, measure the Bracket Order's stop from a level: wire Nearest Bull FVG Bottom into the stop's level input and set the distance to 2 points. The level is read once, when the trade fills, so the stop doesn't wander if a newer gap forms later.
Settings
Outputs
Each output comes in a bullish and a bearish version.
Use something else when
When it doesn't behave
It finds dozens of tiny gaps every day
With Min Gap at 0, every one-tick gap counts, and ES makes plenty. Set Min Gap to something you'd actually trade around. A gap smaller than your expected slippage is noise.
My entry fires inside the very move that made the gap
The gap forms on its third candle, which is often still part of the rally, so price can be "inside" it immediately. Require a real departure first: Bars Since Nearest FVG above 2, or Max Points Away above a threshold, as in the example.
A gap I can see on the chart isn't there
It was probably used up or forgotten. Check the mitigation rule (Wick touch retires gaps fastest), then Max Age, then Tracked Zones: once the node holds its limit, a new gap pushes out the oldest. The node's editor shows why each past gap ended.
The builder won't let me wire it into a Crossover
The FVG keeps its own memory across the engine's monthly chunks of history, so nodes that need the full history behind a value (a Crossover, Since, Capture, a State Machine) can't read it correctly, and the builder refuses rather than guess. Compare its levels with a Comparison, which is exact on every bar.
Going further
"Dipped under the gap's midpoint and closed back above it" sounds like it needs memory, but it doesn't. Read the lowest low of the last few completed bars with Price History, check it's below Nearest FVG CE, and AND that with the last close sitting above it.
Be honest with yourself about the mitigation rule. Full fill, Body close and Wick touch produce different sets of gaps, and therefore different strategies. Choose the one that matches your idea before you look at results. If you do try all three, that's an optimization, and it counts against your search budget like any other.
A target a set number of gap-widths above the top works too: measure the bracket's target from the Nearest FVG Top level in multiples, with the Bands line from above as the scale. Like the stop, it's fixed when the trade fills.