OPEN-SOURCE SCRIPT
FVG Candle - Auto Threshold + Mitigation

FVG Candle (MTF) is a clean and lightweight Fair Value Gap indicator designed for traders who want a structured and non-repainting view of imbalance zones across timeframes.
This script focuses on clarity, mitigation logic, and multi-timeframe consistency, making it suitable for discretionary trading and market structure analysis.
🔹 Key Features
Detects Bullish and Bearish Fair Value Gaps
Multi-Timeframe (MTF) FVG detection
Automatic volatility-based threshold
Split-box visualization for clearer imbalance structure
Automatic mitigation detection and cleanup
Optional bar-based extension
Built-in alerts for new FVG formation
Non-repainting by default
🔹 What Makes This Script Different
Uses a controlled MTF workflow to avoid unnecessary repainting
Automatically removes mitigated gaps to keep the chart clean
Visual split of FVG zones improves precision when interacting with price
Designed to be lightweight and readable, avoiding chart clutter
🔹 Repainting Notice
By default, this script does NOT repaint.
An optional repainting mode is available for study and visualization purposes only.
When enabled, historical FVGs may adjust as higher timeframe candles complete.
🔹 How to Use
Use FVGs as reaction zones, not direct entry signals
Combine with market structure, liquidity, or volume
Bullish FVGs may act as demand zones
Bearish FVGs may act as supply zones
Mitigated FVGs are automatically removed
🔹 Credits
The Fair Value Gap concept and core detection logic are inspired by
Smart Money Concepts [LuxAlgo].
This script is distributed under the CC BY-NC-SA 4.0 license, with proper attribution.
This script focuses on clarity, mitigation logic, and multi-timeframe consistency, making it suitable for discretionary trading and market structure analysis.
🔹 Key Features
Detects Bullish and Bearish Fair Value Gaps
Multi-Timeframe (MTF) FVG detection
Automatic volatility-based threshold
Split-box visualization for clearer imbalance structure
Automatic mitigation detection and cleanup
Optional bar-based extension
Built-in alerts for new FVG formation
Non-repainting by default
🔹 What Makes This Script Different
Uses a controlled MTF workflow to avoid unnecessary repainting
Automatically removes mitigated gaps to keep the chart clean
Visual split of FVG zones improves precision when interacting with price
Designed to be lightweight and readable, avoiding chart clutter
🔹 Repainting Notice
By default, this script does NOT repaint.
An optional repainting mode is available for study and visualization purposes only.
When enabled, historical FVGs may adjust as higher timeframe candles complete.
🔹 How to Use
Use FVGs as reaction zones, not direct entry signals
Combine with market structure, liquidity, or volume
Bullish FVGs may act as demand zones
Bearish FVGs may act as supply zones
Mitigated FVGs are automatically removed
🔹 Credits
The Fair Value Gap concept and core detection logic are inspired by
Smart Money Concepts [LuxAlgo].
This script is distributed under the CC BY-NC-SA 4.0 license, with proper attribution.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.