About This Indicator
A Fair Value Gap (FVG) is a three-candle pattern where the wicks of the first and third candles do not overlap leaving a gap in price that represents an imbalance of orders. Institutional algorithms frequently return to these zones to rebalance before continuing the move.
The EFX FVG indicator plots every FVG the moment it forms and tracks whether price has returned to fill it. Fresh FVGs are prime targets for entries when aligned with structure, session, and order block confluence.
Pine Script Preview
//@version=5
// EFX Fair Value Gap EntraFX
// © 2026 EntraFX. Pro licence required.
indicator("EFX Fair Value Gap", overlay=true, max_boxes_count=300)
minGapPct = input.float(0.01, "Min Gap Size (%)", minval=0.001, step=0.001)
showFilled = input.bool(false, "Show Filled FVGs")
bullFVGCol = input.color(color.new(color.teal, 80), "Bullish FVG")
bearFVGCol = input.color(color.new(color.red, 80), "Bearish FVG")
// Bullish FVG: candle[2] low > candle[0] high
bullFVG = low[2] > high[0] and (low[2] - high[0]) / high[0] * 100 >= minGapPct
// Bearish FVG: candle[2] high < candle[0] low
bearFVG = high[2] < low[0] and (low[0] - high[2]) / low[0] * 100 >= minGapPct
if bullFVG
box.new(bar_index - 2, low[2], bar_index, high[0],
bgcolor=bullFVGCol, border_color=color.new(color.teal, 50))
if bearFVG
box.new(bar_index - 2, high[2], bar_index, low[0],
bgcolor=bearFVGCol, border_color=color.new(color.red, 50))
alertcondition(bullFVG, "Bullish FVG", "EFX: Bullish FVG formed")
alertcondition(bearFVG, "Bearish FVG", "EFX: Bearish FVG formed")