Order Blocks and Fair Value Gaps: Definitions, Detection Rules and Honest Limits
What an order block and a fair value gap are supposed to represent, how to write them as explicit detection rules, and why both concepts contain real subjectivity that code must resolve.
Order blocks and fair value gaps are two of the most used concepts in modern price-structure trading. They are also two of the most loosely defined, which is exactly why they are interesting for rule builders: to automate them you have to decide what you mean. This guide gives plain definitions, shows how they become detection rules, and is explicit about their limits.
Key takeaways
- An order block is commonly described as the last opposing candle before a strong directional move.
- A fair value gap is a three-candle imbalance where candle one's wick and candle three's wick do not overlap.
- Neither concept has a single official definition; every implementation chooses thresholds.
- Visual concepts become automatable only when displacement, mitigation, invalidation and expiry are all numeric.
- In Lupuso, ICT/SMC templates exist as starting points for exactly this kind of formalisation.
What is an order block?
In the way the term is usually used, an order block is the last candle of the opposite direction before a sharp move. A bullish order block is the final down candle before a strong advance; a bearish order block is the final up candle before a strong decline. The idea behind it is that unfilled interest may have accumulated there, and that price returning to the area may react.
That is an interpretation, not a fact about the market. What you can state precisely is the geometry:
- Direction of the move that follows (measured, for example, as a minimum displacement in ATR units or in points).
- Which candle qualifies as the block (last opposite-colour close, or last candle whose body is below/above a threshold).
- Whether the zone is the full candle range, the body only, or an average of the two.
- When the zone is considered mitigated (first touch, close inside, or close through).
- When the zone expires (a number of bars, or after being touched N times).
Each of those five choices changes which candles are labelled. Two traders looking at the same chart can legitimately select different blocks, and both are being consistent with their own definition.
What is a fair value gap?
A fair value gap (FVG) is a three-candle pattern in which the low of the first candle and the high of the third candle leave a space — the middle candle's range does not fill it. In an upward gap: high of candle one is below low of candle three. In a downward gap: low of candle one is above high of candle three.
Written as a rule it is very compact, which is why FVGs translate well into code. What is not automatic is everything around it:
- Size filter. A gap of one tick is rarely interesting. Most implementations require a minimum size, often expressed as a fraction of ATR so the filter adapts across symbols and timeframes.
- Displacement requirement. Many traders only count gaps created by an impulsive move, which again needs a numeric definition of impulsive.
- Fill definition. Does a wick into the gap fill it, or does a close? The choice changes how long a gap survives.
- Validity window. Gaps can persist for many bars; an expiry in bars keeps the set of active zones bounded.
Why are these concepts subjective?
Because they compress several judgements into one visual impression: significance, relevance and current validity. A human glancing at a chart filters out tiny gaps and old zones without noticing they are doing so. Code does not filter anything you did not specify. That is not a weakness of automation — it is its main advantage, provided you accept that your thresholds are decisions, not discoveries.
A useful exercise is to take one chart, mark the order blocks you believe matter, and then write the rules that would select exactly those. The gap between your marked zones and your rule's output is where the subjectivity lives, and where you should adjust deliberately rather than by trial and error.
How does this look inside a builder?
In Lupuso you would typically chain: a structure or displacement condition, an order-block or FVG detection block, a mitigation and invalidation definition, an entry condition on price returning to the zone, and a risk block with a stop outside the zone. The ICT/SMC template family — Order Block + FVG, OTE after CHoCH, Judas Swing London, Power of 3, Silver Bullet — packages common combinations so you start from an editable diagram instead of a blank canvas. Every threshold in those templates is an input you can change, and every export is validated before code is produced.
Common mistakes
- Assuming there is one correct order-block definition. There is not; there is only the one you wrote down.
- Using fixed point thresholds on symbols with very different price scales instead of ATR-relative measures.
- Letting zones accumulate forever, so the chart has dozens of stale levels that all interact.
- Marking zones after the move and then testing a rule that only sees them in hindsight. Detection must use only data available at that bar.
- Treating a zone as a signal by itself. A zone is a location; you still need a trigger, a stop and a size.
Risk note
Structural concepts such as order blocks and fair value gaps are descriptive tools, and different reasonable definitions produce different zones on the same chart. Nothing in their geometry implies that price will respect them. Backtests of zone-based rules are descriptions of past behaviour on data that has already closed, not predictions, and zone rules are especially sensitive to the thresholds you choose. Trading involves risk of loss; study on a demo account, size positions so that a sequence of wrong zone calls is survivable, and treat templates as material to learn from rather than as advice.
English · Español · Français · Deutsch · Português · 中文 · العربية · हिन्दी · 9 supported locales
