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 is one of the most objective concepts in SMC (you can define it with a clear mathematical rule), which makes it great for automation. So let us get to what it actually is.
01What a Fair Value Gap is
A Fair Value Gap (FVG), also called an imbalance , is a price gap formed by three consecutive candles where there is a space the middle candle did not "cover". In a bullish FVG:
- The middle candle is a strong bullish move.
- There is a space between the high of the first candle and the low of the third candle.
- That untouched space 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 through them properly — creating an inefficiency. SMC theory says the market tends to return to those zones to "fill" the imbalance, balancing out the buyers and sellers who never had a chance to trade there, before continuing the move.
An analogy: picture a staircase where someone skipped three steps at once. The FVG is the skipped step. The idea is that price often "comes back to step on it" before carrying on upward. It is not a law of physics — it is an observed tendency, not a guarantee.
03How to trade the FVG
The most common use is as a trend-following entry zone:
- Identify the FVG left behind by an impulse in the direction of the trend.
- Wait for the return of price to the gap zone (a 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 on 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 gets more robust. SMC is about stacking confluences, not using one concept in isolation.
04Detecting the FVG in code (it is objective!)
The FVG is the easiest SMC concept to automate, because it has an exact mathematical definition. Here it is on both platforms:
# detects a bullish FVG: gap between high[i-2] and low[i] def detectar_fvg_alta(df): fvgs = [] for i in range(2, len(df)): max_v1 = df.iloc[i-2]["high"] min_v3 = df.iloc[i]["low"] # there is a gap if the low of the 3rd candle is above the high of the 1st if min_v3 > max_v1: fvgs.append({ "indice": i, "base": max_v1, # bottom of the gap "topo": min_v3, # top of the gap "tamanho": min_v3 - max_v1, }) return fvgs
//@version=5 indicator("Fair Value Gap", overlay=true) // bullish FVG: current low above the high from 2 candles ago fvgAlta = low > high[2] if fvgAlta // draws 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 carries some subjectivity), the FVG is purely geometric — three candles, one comparison of a high and a low. A bot detects it without ambiguity. It is an excellent building block for automated SMC strategies.
The FVG is one piece of the SMC puzzle
See the full guide: structure, breaks (BOS/CHoCH), order blocks and liquidity together.
05Caveats and honesty
Not every FVG is the same: small gaps, gaps in a sideways market, or gaps against the trend are worth little. An FVG only matters when it comes from a strong impulse, with the trend, ideally with confluence (an order block, a structural level). And the fill is not guaranteed — sometimes price never comes back. Treat it as a probability zone, not a certainty.
The FVG is a reading tool, part of a bigger system. On its own, marking every gap on the chart and trading it mechanically does not 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 high of the first and the low of the third do not overlap (in a bullish FVG). It represents an imbalance that price often comes back to fill.
Why does price fill the FVG?
The theory says the gap is an inefficiency — price moved through too fast without trading properly. The market tends to come back to "balance" it before continuing. It is not guaranteed, it is an observed tendency.
How do you identify an FVG?
Look at three consecutive candles. In a bullish FVG, there is a gap between the high of the first and the low of the third (a space the middle candle never touched). It is an exact geometric definition — which is why it is easy to automate.
FVG or order block, which one should you use?
It is not "or" — they complement each other. The FVG is more objective (geometric); the order block carries more institutional context. When they land in the same zone, the confluence is strong. SMC is about stacking confluences.
Can the FVG be automated?
Yes, and it is the easiest SMC concept to code, because it has an exact mathematical definition (comparing the high and low of three candles). An excellent building block for automated strategies. But validate its relevance (size, trend, confluence).