Fair Value Gap
Dec 20, 2024

The Fair Value Gap indicator identifies and displays price imbalances where the market lacks continuity, leaving "gaps" that often act as significant reference points for retracements and institutional activity. By visually distinguishing between mitigated and unmitigated zones, the tool helps traders monitor which levels have been tested and which remain valid points of interest for potential support or resistance.
Usage
The indicator can be used to identify institutional accumulation/distribution zones and liquidity pockets. A Bullish FVG (green) forms when the previous high is lower than the subsequent low, suggesting a support level. A Bearish FVG (red) forms when the previous low is higher than the subsequent high, suggesting a resistance level.
Traders can utilize several detection modes to refine signal quality:
- Classic (3-bar): The standard identification based on wick gaps.
- ATR Filter: Filters gaps based on volatility to ensure only significant imbalances are shown.
- Displacement Score: Focuses on aggressive price movement (large bodies and range).
- Bayesian Fill Prior: Uses a statistical model to estimate the probability of the gap being filled based on historical data.
When a gap is "touched" by price, it is considered mitigated. Users can enable the "Reduce mitigated FVG" setting to shrink the box dynamically, showing only the remaining untested portion of the imbalance.
Details
The script implements advanced filtering logic beyond standard 3-bar patterns. It includes an ADX regime filter to detect gaps specifically during trending environments and a "Body + Noise Band" mode that uses candle bodies rather than wicks to find more conservative zones. The Bayesian model tracks historical fill rates across three different gap sizes (small, medium, large) to provide a data-driven "probability of fill" for new gaps.
Settings
Fair Value Gap
- Display FVG: Toggles the visibility of the indicator.
- Number of FVG to show: Determines the maximum number of historical gaps kept on the chart.
- Reduce mitigated FVG: If enabled, the box dimensions will shrink as price eats into the gap.
- Bullish/Bearish FVG Color: Customizes the background color for unmitigated zones.
- Mitigated FVG Color Bullish/Bearish: Customizes the background color for zones that have been touched.
- FVG detection mode: Selects the logic used to identify gaps (Classic, ATR, Displacement, etc.).
- Sensitivity: A single slider that scales internal thresholds for the selected detection mode.
FAQ
How do I access Fair Value Gap?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
What is the difference between a mitigated and unmitigated FVG?
An unmitigated FVG is a fresh price gap that hasn't been revisited, representing high potential liquidity. A mitigated FVG has been touched by price, suggesting the imbalance is partially or fully filled.
How does the "Reduce mitigated FVG" feature work?
When price enters an FVG box without fully breaking through it, the indicator can automatically adjust the box boundaries to only cover the specific price area that remains untested.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.