OPEN-SOURCE SCRIPT
Fair Value Gaps (FVG)

This indicator automatically detects Fair Value Gaps (FVGs) using the classic 3-candle structure (ICT-style).
It is designed for traders who want clean charts and relevant FVGs only, without the usual clutter from past sessions or tiny, meaningless gaps.
Key Features
• Bullish & Bearish FVG detection
Identifies imbalances where price fails to trade efficiently between candles.
• Automatic FVG removal when filled
As soon as price trades back into the gap, the box is deleted in real time – no more outdated zones on the chart.
• Only shows FVGs from the current session
At the start of each new session, all previous FVGs are cleared.
Perfect for intraday traders who only care about today’s liquidity map.
• Flexible minimum gap size filter
Avoid noise by filtering FVGs using one of three modes:
Ticks (based on market tick size)
Percent (relative to current price)
Points (absolute price distance)
• Right-extension option
Keep gaps extended forward in time or limit them to the candles that created them.
Why This Indicator?
Many FVG indicators overwhelm the chart with zones from previous days or tiny imbalances that don’t matter.
This version keeps things clean, meaningful, and real-time accurate, ideal for day traders who rely on market structure and liquidity.
It is designed for traders who want clean charts and relevant FVGs only, without the usual clutter from past sessions or tiny, meaningless gaps.
Key Features
• Bullish & Bearish FVG detection
Identifies imbalances where price fails to trade efficiently between candles.
• Automatic FVG removal when filled
As soon as price trades back into the gap, the box is deleted in real time – no more outdated zones on the chart.
• Only shows FVGs from the current session
At the start of each new session, all previous FVGs are cleared.
Perfect for intraday traders who only care about today’s liquidity map.
• Flexible minimum gap size filter
Avoid noise by filtering FVGs using one of three modes:
Ticks (based on market tick size)
Percent (relative to current price)
Points (absolute price distance)
• Right-extension option
Keep gaps extended forward in time or limit them to the candles that created them.
Why This Indicator?
Many FVG indicators overwhelm the chart with zones from previous days or tiny imbalances that don’t matter.
This version keeps things clean, meaningful, and real-time accurate, ideal for day traders who rely on market structure and liquidity.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
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.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
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.