OPEN-SOURCE SCRIPT

Fair Value Gap [Dova Lazarus]

1 340
Fair Value Gap (FVG) indicator detects and visualizes price inefficiencies between three consecutive candles:

* Bullish FVG: current candle’s low > high of two candles ago
* Bearish FVG: current candle’s high < low of two candles ago

Includes automatic detection of mitigations:

* Partial mitigation: price enters but doesn’t fully fill the gap
* Full mitigation: price completely fills the gap
* Optional **50% mitigation** based on midpoint reach

**Display styles**:

* Box (filled rectangle)
* High & Low lines only
* Midpoint lines (optional, with customizable style and color)

Multi-timeframe support:

* Up to 5 higher timeframes (HTF), each with individual color, label, and visibility settings
* HTF gaps help identify key support/resistance and price magnet zones

Customization options:

* Separate colors for unmitigated and mitigated gaps
* Adjustable width and extension of boxes
* Optional deletion of mitigated gaps
* Label positioning, size, and visibility

All settings are grouped for clarity:

* FVG Appearance
* HTF FVGs
* Mitigation
* General Settings

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.