Fair Value Gap
Apr 10, 2023

The Fair Value Gap indicator identifies and highlights price imbalances where a gap exists between the high or low of a candle and the high or low of the candle two periods prior. This tool helps traders visualize these liquidity zones and potential price targets as the market seeks to fill these imbalances.
Usage
Traders use Fair Value Gaps (FVG) to identify areas of market inefficiency. When a gap is formed, price often has a tendency to return to these levels.
- Bullish Scenarios: While traditional FVG logic suggests waiting for a re-entry for a long, this script emphasizes the "fill the gap" movement. A bullish gap (plotted when the low of a candle is higher than the high of two candles back) suggests price may trend through the zone.
- Bearish Scenarios: A bearish gap (plotted when the high of a candle is lower than the low of two candles back) indicates a potential downward move to fill the inefficiency.
Users can leverage the "Delete Filled Gaps" setting to ensure the chart remains focused only on active price imbalances that have not yet been mitigated.
Details
The indicator calculates gaps based on a three-candle sequence. A gap is identified if there is no overlap between the first candle's wick and the third candle's wick. Unlike standard interpretations, this version uses reversed color logic to align with the "gap fill" trading philosophy, where the objective is to trade through the identified zone. The script includes logic to filter gaps by a specific point size, ensuring that only significant market imbalances are displayed.
Settings
General Settings
- Max Number of Gaps: Limits the number of historical gaps displayed on the chart to maintain performance.
- Min Zone Size to Plot (in points): Filters out small gaps that do not meet the minimum point threshold.
- Max Zone Size to Plot (in points): Filters out excessively large gaps that may be outliers.
- Delete Filled Gaps: When enabled, removes the box from the chart once price has traded through the gap level.
Border and Fill Colors
- Bearish Gap Border/Fill: Customize the visual appearance of bearish imbalances.
- Bullish Gap Border/Fill: Customize the visual appearance of bullish imbalances.
FAQ
How do I use the Fair Value Gap indicator?
The indicator automatically plots boxes on your chart when price imbalances are detected. You can use these zones as targets or areas of interest where price is likely to return.
Can I filter out small, insignificant gaps?
Yes, you can use the "Min Zone Size" setting to ensure only gaps of a certain point value are displayed, helping to reduce market noise.
How can I access the Fair Value Gap?
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.