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.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
ᵣᵢCₕ BᵥWY
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
ᵣᵢCₕ BᵥWY
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。