Fair Value Gap (FVG)
Feb 3, 2025

The Fair Value Gap (FVG) indicator identifies and tracks market imbalances, providing traders with dynamic support and resistance zones based on price inefficiencies.
Usage
The Fair Value Gap (FVG) tool is used to detect price action imbalances where the market moves rapidly, leaving a gap between the wick of the first candle and the wick of the third candle in a three-bar sequence.
- Bullish FVGs: Occur when the low of the third candle is higher than the high of the first candle. These zones often act as future support.
- Bearish FVGs: Occur when the high of the third candle is lower than the low of the first candle. These zones often act as future resistance.
- Dynamic Extensions: The indicator automatically extends dotted lines from the most recent FVG levels, allowing traders to monitor price reaction in real-time.
- Gap Filling: Users can track when a gap is "filled" (when price retraces into the zone). Filled gaps can be visually distinguished or hidden based on user preference.
Details
Fair Value Gaps represent areas where there is an imbalance between buying and selling pressure. The script identifies these zones by comparing the high/low relationship of three consecutive bars.
The implementation includes a filtering mechanism based on a percentage threshold, ensuring that only significant gaps are highlighted. To maintain chart cleanliness, the script utilizes a lookback buffer and array management to remove or modify historical gaps once they are no longer relevant or have been fully mitigated.
Settings
- Lookback Period: Defines the maximum number of historical Fair Value Gaps to display on the chart.
- Minimum Gap Size (%): A percentage-based filter that determines the minimum size a gap must be relative to price to be plotted.
- Bullish FVG Color: Sets the color for bullish imbalance boxes and extension lines.
- Bearish FVG Color: Sets the color for bearish imbalance boxes and extension lines.
- Show Filled Gaps: A toggle to determine whether gaps that have been touched by price remain visible on the chart.
- Line Width: Adjusts the thickness of the dotted extension lines for active gaps.
FAQ
How do I use Fair Value Gaps in my strategy?
FVGs are commonly used as targets for take-profits or as entry zones for mean reversion and trend continuation setups, as price frequently returns to "balance" these inefficiencies.
Can I filter out small, insignificant gaps?
Yes, you can adjust the "Minimum Gap Size (%)" in the settings to ensure only significant market imbalances are highlighted on your chart.
How can I access the Fair Value Gap (FVG) indicator?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
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.