OPEN-SOURCE SCRIPT
ICT FVG Detector

This indicator identifies ICT Fair Value Gaps (FVGs) on any timeframe and overlays them as clean, interactive zones directly on your chart. It covers both standard imbalances and higher-timeframe (HTF) imbalances transposed onto lower timeframes — a core concept in ICT-based trading.
What it detects
BISI (Buy-side Imbalance, Sell-side Inefficiency) — bullish FVGs where a gap exists between the high of bar[2] and the low of bar[0]
SIBI (Sell-side Imbalance, Buy-side Inefficiency) — bearish FVGs where a gap exists between the low of bar[2] and the high of bar[0]
Displacement FVGs — tagged when the middle candle of the 3-bar pattern (the actual displacement candle) trades through the most recent confirmed swing high or low, signalling a genuine structure break
HTF Alignment
FVGs from the next-higher relevant timeframe are automatically transposed onto the current chart as gray-shaded zones, making it easy to identify where higher-timeframe imbalances sit without switching charts.
Valid pairs:
Chart timeframe HTF source
1m 15m
5m 1H
15m 4H
1H Daily
4H Weekly
Daily Monthly
HTF zones are visually distinct (gray fill) so they never compete with native FVGs. On unsupported timeframes, HTF zones are simply not drawn.
Features
Four draw styles: Lines + Fill, Lines Only, Fill Only, Boxes
Solid, dashed, or dotted boundary lines
Extend zones to current bar or a fixed number of bars
Mitigation tracking — zones dim or delete once price trades back through them (configurable separately for native and HTF FVGs)
Invisible hover labels positioned at the vertical midpoint of each zone — hover to instantly identify the gap type without cluttering the chart
Alerts for new BISI, SIBI, Displacement BISI, and Displacement SIBI
Settings
All inputs are grouped into five sections: FVG Detection, Swing / Displacement, Display, Mitigation, and HTF Alignment — making it straightforward to tune each layer independently.
What it detects
BISI (Buy-side Imbalance, Sell-side Inefficiency) — bullish FVGs where a gap exists between the high of bar[2] and the low of bar[0]
SIBI (Sell-side Imbalance, Buy-side Inefficiency) — bearish FVGs where a gap exists between the low of bar[2] and the high of bar[0]
Displacement FVGs — tagged when the middle candle of the 3-bar pattern (the actual displacement candle) trades through the most recent confirmed swing high or low, signalling a genuine structure break
HTF Alignment
FVGs from the next-higher relevant timeframe are automatically transposed onto the current chart as gray-shaded zones, making it easy to identify where higher-timeframe imbalances sit without switching charts.
Valid pairs:
Chart timeframe HTF source
1m 15m
5m 1H
15m 4H
1H Daily
4H Weekly
Daily Monthly
HTF zones are visually distinct (gray fill) so they never compete with native FVGs. On unsupported timeframes, HTF zones are simply not drawn.
Features
Four draw styles: Lines + Fill, Lines Only, Fill Only, Boxes
Solid, dashed, or dotted boundary lines
Extend zones to current bar or a fixed number of bars
Mitigation tracking — zones dim or delete once price trades back through them (configurable separately for native and HTF FVGs)
Invisible hover labels positioned at the vertical midpoint of each zone — hover to instantly identify the gap type without cluttering the chart
Alerts for new BISI, SIBI, Displacement BISI, and Displacement SIBI
Settings
All inputs are grouped into five sections: FVG Detection, Swing / Displacement, Display, Mitigation, and HTF Alignment — making it straightforward to tune each layer independently.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
ᵣᵢCₕ BᵥWY
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
ᵣᵢCₕ BᵥWY
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.