If the order block marks where smart money acted, the Fair Value Gap (FVG) marks where price moved too fast — leaving an inefficiency behind. It's one of the most objective SMC concepts (you can define it with a clear mathematical rule), which makes it great to automate. Here's what it actually is.
01What a Fair Value Gap is
A Fair Value Gap, also called an imbalance, is a price gap formed by three consecutive candles where there's a space the middle candle didn't "cover." In a bullish FVG:
- The middle candle is a strong upward move.
- There's a space between the high of the first candle and the low of the third candle.
- That space — untouched — is the Fair Value Gap.
02Why price tends to fill it
The logic: when price moves very fast (the strong middle candle), it "skips" levels without trading properly — creating an inefficiency. SMC theory says the market tends to return to those zones to "fill" the imbalance, balancing buyers and sellers who didn't get a chance to trade there, before continuing the move.
Analogy: imagine a staircase where someone jumped three steps at once. The FVG is the skipped step. The idea is that price often "comes back to step on the step" before continuing up. It's not a physical law — it's an observed tendency, not a guarantee.
03How to trade the FVG
The most common use is as an entry zone in the direction of the trend:
- Identify the FVG left by an impulse in the trend's direction.
- Wait for the return of price to the gap zone (partial or full fill).
- Look for an entry in the zone, with confirmation, in the direction of the original impulse.
- Stop on the other side of the gap; target in the continuation of the move.
A powerful combination: FVG + order block in the same zone = strong confluence. When a gap coincides with an order block, the zone of interest becomes more robust. SMC is about stacking confluences, not using one concept in isolation.
04Detecting the FVG with code (it's objective!)
The FVG is the easiest SMC concept to automate, because it has an exact mathematical definition. Here it is on both platforms:
# detect a bullish FVG: gap between high[i-2] and low[i] def detect_bullish_fvg(df): fvgs = [] for i in range(2, len(df)): high_c1 = df.iloc[i-2]["high"] low_c3 = df.iloc[i]["low"] # there's a gap if the 3rd candle's low is above the 1st's high if low_c3 > high_c1: fvgs.append({ "index": i, "base": high_c1, # bottom of the gap "top": low_c3, # top of the gap "size": low_c3 - high_c1, }) return fvgs
//@version=5 indicator("Fair Value Gap", overlay=true) // bullish FVG: current low above the high 2 candles back bullFvg = low > high[2] if bullFvg // draw the gap zone box.new(bar_index[2], low, bar_index, high[2], border_color=color.orange, bgcolor=color.new(color.orange, 85))
This is why the FVG shines in automation: unlike the order block (which has subjectivity), the FVG is purely geometric — three candles, a comparison of a high and a low. A bot detects it unambiguously. It's a great building block for automated SMC strategies.
The FVG is one piece of the SMC puzzle
See the complete guide: structure, break (BOS/CHOCH), order block and liquidity together.
05Cautions and honesty
Not every FVG is equal: small gaps, in a ranging market, or against the trend have little value. An FVG is only relevant when it comes from a strong impulse, in the trend's direction, ideally with confluence (order block, structure level). And the fill isn't guaranteed — sometimes price never comes back. Treat it as a probability zone, not a certainty.
The FVG is a reading tool, part of a larger system. On its own, marking every gap on the chart and trading mechanically doesn't work. Combined with trend, structure and risk management, it adds value as an entry zone with good risk/reward.
06Frequently asked questions
What is a Fair Value Gap?
A price gap formed by three candles where the first's high and the third's low don't overlap (in a bullish FVG). It represents an imbalance that price often returns to fill.
Why does price fill the FVG?
The theory says the gap is an inefficiency — price moved too fast without trading properly. The market tends to come back to "balance it" before continuing. It's not guaranteed, it's an observed tendency.
How do you identify an FVG?
Look at three consecutive candles. In a bullish FVG, there's a gap between the first's high and the third's low (a space untouched by the middle candle). It's an exact geometric definition — that's why it's easy to automate.
FVG or order block, which to use?
It's not "or" — they're complementary. The FVG is more objective (geometric); the order block has more institutional context. When they coincide in the same zone, the confluence is strong. SMC is about stacking confluences.
Can you automate the FVG?
Yes, and it's the easiest SMC concept to code, because it has an exact mathematical definition (a comparison of the high/low of three candles). A great building block for automated strategies. But validate the relevance (size, trend, confluence).