🔥Black Friday Sale: Get 25% OFF Premium with code BLACKFRIDAY — Sale ends December 1st!🎉
Fair Value Gaps (FVG) and Imbalances — How to Build High-Probability SMC Entry Models

Fair Value Gaps (FVG) and Imbalances — How to Build High-Probability SMC Entry Models

By HorizonAI Team

Fair Value Gaps (FVGs) and imbalances are core parts of modern Smart Money Concepts (SMC).
They’re meant to show where price moved too fast, leaving behind “unfilled” price levels that the market may later want to rebalance.

The problem: most traders draw FVGs on screenshots, but never test whether their FVG rules actually add edge.

In this guide, you’ll learn:

  • What FVGs and imbalances really are (ICT-style, 3-candle view)
  • How displacement creates FVGs—and why they might matter
  • How to combine FVGs with structure, liquidity, and premium/discount
  • Simple ways to visualize FVGs in Pine Script v6 on EURUSD
  • How HorizonAI can turn your FVG ideas into testable entry models

What Is a Fair Value Gap (FVG)?

In ICT-style SMC, a fair value gap is a 3‑candle pattern:

  • Candle 1, Candle 2, Candle 3
  • In a bullish FVG:
    • The low of Candle 3 is above the high of Candle 1
    • There’s a “gap” in between that price didn’t trade through
  • In a bearish FVG:
    • The high of Candle 3 is below the low of Candle 1

This creates a price imbalance:

  • Price moved so quickly that there was little or no trading through that zone
  • Market may later revisit this area to fill orders and rebalance

You don’t need to be ultra‑strict. Conceptually, you’re tracking:

  • Strong displacement moves that skip levels
  • “Gappy” zones price wants to return to before continuing

Displacement, Imbalance, and Rebalancing

FVGs are a symptom of displacement:

  • Large, directional candles (often with volume/volatility spikes)
  • Price surges away from a prior area, breaking structure and/or raiding liquidity

In SMC thinking:

  • Displacement shows aggressive institutional flows
  • FVGs mark areas where the order book was thin
  • Later, price often rebalances by trading back through the gap

That rebalance can offer:

  • Entry opportunities in the direction of the displacement
  • Or sometimes a mean‑reversion move into the FVG before trend resumes

FVGs in Context: Structure, Liquidity, and Premium/Discount

An isolated FVG is just a visual curiosity.
FVGs become meaningful when you add context:

  • Market structure (HH/HL vs LH/LL)
    • Are you in a bullish or bearish environment?
    • Was there a BOS or CHOCH near the displacement?
  • Liquidity
    • Did the displacement move raid prior highs/lows?
    • Did it clear out equal highs/equal lows, previous day high/low, or session extremes?
  • Premium/discount
    • Is the FVG sitting in premium or discount relative to a relevant swing?

Example SMC logic:

  • In a bullish context, you may look for:
    • Strong bullish displacement that breaks structure
    • Bullish FVG in discount (below 50% of the swing)
    • Price returns into that FVG and respects it as support → long entry idea

Simple FVG Visualization in Pine Script (EURUSD)

Let’s start with a basic FVG detector you can run on EURUSD.

//@version=5
indicator("Fair Value Gaps (Basic)", overlay = true)

// Bullish FVG: low of bar 3 > high of bar 1
bullFVG = low[0] > high[2]

// Bearish FVG: high of bar 3 < low of bar 1
bearFVG = high[0] < low[2]

// Store FVG zones using var (for visualization)
var float bullFVGTop    = na
var float bullFVGBottom = na
var float bearFVGTop    = na
var float bearFVGBottom = na

if bullFVG
    bullFVGBottom := high[2]
    bullFVGTop    := low[0]

if bearFVG
    bearFVGBottom := high[0]
    bearFVGTop    := low[2]

// Plot FVG zones as bands (simple visualization)
plot(bullFVGTop,    "Bull FVG Top",    color = color.new(color.green, 70), style = plot.style_linebr)
plot(bullFVGBottom, "Bull FVG Bottom", color = color.new(color.green, 85), style = plot.style_linebr)

plot(bearFVGTop,    "Bear FVG Top",    color = color.new(color.red, 70), style = plot.style_linebr)
plot(bearFVGBottom, "Bear FVG Bottom", color = color.new(color.red, 85), style = plot.style_linebr)

This simple script:

  • Marks bullish and bearish FVGs with band lines
  • Let’s you visually inspect how price reacts when it returns to these zones

It’s not perfect, but it’s enough to start testing basic ideas like:

  • “How often does EURUSD bounce from a bullish FVG in a bullish trend?”
  • “Do FVGs near prior liquidity grabs behave differently?”

HorizonAI can build more advanced versions (multiple active gaps, mitigation logic, higher‑timeframe FVG maps, etc.).

Basic FVG Entry Model Ideas

Here are some entry model concepts you can experiment with.

Model 1: Trend-Following FVG Fills

Idea:

  • Use FVGs to enter in the direction of displacement after a retrace.

Rules (conceptual, bullish example):

  1. 4H structure is bullish (HH/HL, recent bullish BOS)
  2. On 15m, strong bullish displacement:
    • Creates a bullish FVG
    • Breaks a prior swing high
  3. Price pulls back into the FVG area
  4. Entry:
    • Long when price enters the FVG and shows a lower‑TF bullish CHOCH/BOS
    • Stop below FVG low or below nearest bullish OB
    • Target: opposing liquidity or 2–3R

You can test variations:

  • Only take FVGs in discount relative to the swing
  • Require confluence with an order block
  • Add time‑of‑day filters (London or New York sessions)

Model 2: Counter-Move Into FVG, Then Reverse

Idea:

  • Use FVG as a magnet for price to revert into before trend resumes.

Example (bearish):

  1. Market is in a downtrend (LH/LL)
  2. Strong bearish displacement leaves a bearish FVG below
  3. Price bounces aggressively (counter‑trend) back up into the FVG
  4. Inside the FVG:
    • Look for rejection (wicks, lower‑TF bearish CHOCH)
  5. Entry:
    • Short from within the FVG
    • Stop above the gap
    • Target continuation lows

Again, you can test:

  • Does this work better when FVG is in premium?
  • How much of the FVG needs to be filled (partial vs full)?

Simple FVG-Based Strategy Shell in Pine (Conceptual)

Here’s a basic FVG touch strategy shell for EURUSD 15m.
This is not production logic—it’s here to show how ideas translate to code.

//@version=5
strategy("FVG Touch Test (EURUSD 15m)", overlay = true,
     initial_capital = 10000, commission_type = strategy.commission.percent, commission_value = 0.01)

// --- FVG detection (3-bar pattern) ---
bullFVG = low[0] > high[2]
bearFVG = high[0] < low[2]

var float bullTop    = na
var float bullBottom = na
var float bearTop    = na
var float bearBottom = na

if bullFVG
    bullBottom := high[2]
    bullTop    := low[0]

if bearFVG
    bearBottom := high[0]
    bearTop    := low[2]

// Plot zones
plot(bullTop,    "Bull FVG Top",    color = color.new(color.green, 70), style = plot.style_linebr)
plot(bullBottom, "Bull FVG Bottom", color = color.new(color.green, 85), style = plot.style_linebr)
plot(bearTop,    "Bear FVG Top",    color = color.new(color.red, 70),   style = plot.style_linebr)
plot(bearBottom, "Bear FVG Bottom", color = color.new(color.red, 85),   style = plot.style_linebr)

// --- Simple entry idea: long when we re-enter a recent bull FVG ---
inBullFVG = not na(bullTop) and not na(bullBottom) and close <= bullTop and close >= bullBottom

riskPercent    = input.float(1.0, "Risk per Trade (%)", minval = 0.1, maxval = 5.0)
rewardMultiple = input.float(2.0, "Target RR", minval = 1.0, maxval = 5.0)

if inBullFVG and barstate.isconfirmed
    entryPrice  = close
    stopPrice   = bullBottom  // simple stop below FVG
    riskPips    = math.abs(entryPrice - stopPrice) / syminfo.mintick
    riskAmount  = strategy.equity * riskPercent / 100.0
    qty         = riskPips > 0 ? riskAmount / (riskPips * syminfo.mintick) : 0.0
    targetPrice = entryPrice + (entryPrice - stopPrice) * rewardMultiple

    if qty > 0
        strategy.entry("Long FVG", strategy.long, qty = qty)
        strategy.exit("TP/SL", "Long FVG", stop = stopPrice, limit = targetPrice)

From here you can experiment with:

  • Adding trend filters (only long when 4H or 1H structure is bullish)
  • Conditioning entries on premium/discount
  • Combining FVGs with OBs and liquidity sweeps

HorizonAI can take your conditions and generate a much more robust version, including multi‑timeframe logic.

Common FVG Mistakes

❌ Mistake #1: Treating Every Gap as Equal

Not all FVGs are created equal.
High‑probability ones tend to:

  • Come from strong displacement with clear structure impact
  • Be aligned with higher‑timeframe bias
  • Appear near liquidity events (sweeps of highs/lows)

Filtering out random, tiny gaps can significantly improve quality.

❌ Mistake #2: Ignoring Structure and Liquidity

An FVG sitting in the middle of a choppy range with no liquidity story behind it is just a drawing.

Better:

  • Use FVG in conjunction with:
    • HH/HL vs LH/LL structure (trend vs range)
    • BOS/CHOCH
    • Order blocks
    • Previous day/session highs and lows

❌ Mistake #3: Never Backtesting Entry Models

Seeing 5 great FVG examples on screenshots proves nothing.

You need to ask:

  • Over 100+ data points:
    • What’s the win rate of FVG touch entries?
    • What’s the average RR?
    • How often do they fail immediately vs chop vs trend?

Only then can you say whether FVG adds real edge beyond simpler entries.

Use HorizonAI to Build and Test FVG Models

FVG‑based systems can get complex fast:

  • Multiple active FVGs (higher‑timeframe and intraday)
  • Structure‑aware filters (4H bias vs 15m entries)
  • Session‑based logic (London vs New York)
  • Premium/discount confluence

Coding all of that by hand takes time. With HorizonAI you can:

  • Describe exactly how you see FVGs in plain English
  • Generate Pine Script v6 strategies and indicators that:
    • Detect bullish and bearish FVGs
    • Apply structure, liquidity, and premium/discount filters
    • Manage risk with stops, targets, and position sizing
  • Access prebuilt SMC tools (structure/FVG helpers) to speed up your workflow

Example prompts:

"Create a Pine Script v6 strategy for EURUSD 15m that trades only in the direction of 4H trend, enters on FVG fills in discount/premium zones, and uses 1% risk per trade with 2:1 RR."

"Build an indicator that highlights FVGs caused by displacement candles that break structure and marks when price later returns to those FVGs during London or New York sessions."

"Generate a backtesting framework that logs the performance of first touches vs second touches of FVGs across 6 months of EURUSD 15m data."

Build and test your FVG models with HorizonAI →

Final Thoughts

Fair Value Gaps are a powerful SMC concept when you:

  1. Understand them as imbalances from displacement, not just random gaps
  2. Always view them in the context of structure, liquidity, and premium/discount
  3. Focus on simple, testable entry models instead of overcomplicated narratives
  4. Backtest your rules across markets and timeframes to see what actually holds up
  5. Use automation to handle the complexity so you can focus on design and interpretation

Once you have your FVG playbook, HorizonAI can help you turn it into Pine Script, test your assumptions, and iterate much faster than doing everything by hand.

Questions about FVG definitions, modeling, or coding? Join our Discord community to compare notes with other traders exploring SMC and automation.