# Fair Value Gap

Fair Value Gap is an indicator on [Vela](https://vela.luxalgo.com/chart), our next-generation charting platform, written in Pine Script®.

The Fair Value Gap indicator detects bullish and bearish imbalances the moment a three-bar sequence leaves a void, draws each gap as a box, and clears it once price returns to fill it. Automatic volatility thresholds, multi-timeframe detection, optional mitigation levels, and a dashboard of gap counts and fill rates keep imbalance traders focused on the zones that still matter.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Jul 28, 2023.
- Access: free.
- Concepts: [Fair Value Gap](https://www.luxalgo.com/library/concept/fair-value-gap/) (primary)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=au5ipjrn94pk74fksebi3sgg
- Page: https://www.luxalgo.com/library/indicator/fair-value-gap/

**Fair Value Gap** finds the voids that aggressive moves leave behind and manages their whole life cycle on the chart. A bullish gap prints when the current low clears the high from two bars back; a bearish gap when the current high stays under the low from two bars back. Each imbalance becomes a box, and the box is deleted once a bar closes back through it, the foundational detection pattern behind the [Smart Money Concepts family](https://www.luxalgo.com/library/family/smc-ict/).

## How to Trade the Fair Value Gap?

- **Fresh gap prints**: one-sided pressure just left a range untraded. Treat the box as a zone of interest where price may return before continuing.
- **Price closes through a box**: once a bar closes beyond the gap's far edge, the gap is mitigated and removed; enable Mitigation Levels to leave dashed lines at those prices for later retests.
- **Higher-timeframe confluence**: run the Timeframe input above the chart (for example 1-hour gaps over a 15-minute chart) and favor setups that align across both.
- **Dashboard read**: bullish and bearish gap counts with mitigation percentages show how reliably the market has been filling its inefficiencies lately.

## Fair Value Gap Settings

- **Threshold %**: the minimum size a gap must reach to count, with **Auto** deriving the threshold from average volatility instead.
- **Unmitigated Levels**: how many of the most recent open gaps stay highlighted.
- **Mitigation Levels**: draws dashed lines where gaps were filled.
- **Timeframe**: runs detection on a timeframe independent of the chart.
- **Extend / Dynamic**: projects boxes forward and lets subsequent price action resize their boundaries; further toggles cover dashboard visibility, corner, and text size.

## Frequently Asked Questions

### What do the dashboard percentages tell me?

They report the share of detected gaps that price has already returned to fill, separately for bullish and bearish cases. A high fill rate favors waiting for retracement entries; a low one says imbalances are being left behind by a market on the move.

### Do I need a separate tool for higher-timeframe gaps?

Not necessarily. The Timeframe setting overlays higher-timeframe gaps on any chart. If you want a build dedicated to that job, [HTF Fair Value Gap](https://www.luxalgo.com/library/indicator/htf-fair-value-gap/) focuses entirely on higher-timeframe imbalances.

### How do I access the Fair Value Gap indicator?

It is free on the LuxAlgo Library. The Use in Quant button on this page loads it into Quant, our coding agent, where you can run and backtest gap behavior on your preferred symbols. You can also copy the source code from this page and run it anywhere Pine Script® runs.

## Related indicators

- [Fair Value Gap Absorption Indicator](https://www.luxalgo.com/library/indicator/fair-value-gap-absorption-indicator/) (Fair Value Gap): markdown at https://www.luxalgo.com/library/indicator/fair-value-gap-absorption-indicator.md
- [Fair Value Gaps Mitigation Oscillator](https://www.luxalgo.com/library/indicator/fair-value-gaps-mitigation-oscillator/) (Fair Value Gap): markdown at https://www.luxalgo.com/library/indicator/fair-value-gaps-mitigation-oscillator.md
- [Breakaway Fair Value Gaps](https://www.luxalgo.com/library/indicator/breakaway-fair-value-gaps/) (Fair Value Gap): markdown at https://www.luxalgo.com/library/indicator/breakaway-fair-value-gaps.md
- [HTF Fair Value Gap](https://www.luxalgo.com/library/indicator/htf-fair-value-gap/) (Fair Value Gap): markdown at https://www.luxalgo.com/library/indicator/htf-fair-value-gap.md
- [Inversion Fair Value Gaps (IFVG)](https://www.luxalgo.com/library/indicator/inversion-fair-value-gaps-ifvg/) (Fair Value Gap): markdown at https://www.luxalgo.com/library/indicator/inversion-fair-value-gaps-ifvg.md
- [ICT Implied Fair Value Gap (IFVG)](https://www.luxalgo.com/library/indicator/ict-implied-fair-value-gap-ifvg/) (Fair Value Gap): markdown at https://www.luxalgo.com/library/indicator/ict-implied-fair-value-gap-ifvg.md
- [Liquidity Voids (FVG)](https://www.luxalgo.com/library/indicator/liquidity-voids-fvg/) (Fair Value Gap): markdown at https://www.luxalgo.com/library/indicator/liquidity-voids-fvg.md
- [FVG Channel](https://www.luxalgo.com/library/indicator/fvg-channel/) (Fair Value Gap): markdown at https://www.luxalgo.com/library/indicator/fvg-channel.md

---

Source: https://www.luxalgo.com/library/indicator/fair-value-gap/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
