PROTECTED SOURCE SCRIPT
Cập nhật Precision Fair Value Gap (FVG)

This indicator scans historical price action to automatically detect unmitigated Fair Value Gaps (FVGs) with precision.
It highlights bullish and bearish gaps that remain open until price fills them, helping traders spot key liquidity imbalances used in Smart Money Concepts (SMC).
🔹 Features
Detects both bullish and bearish FVGs.
Auto-removes mitigated gaps once price returns to fill them.
Configurable gap size, line weight, and colors.
Optimized for performance with capped lookback and line control.
Works on all timeframes and markets.
Perfect for traders who rely on price action and institutional order flow to refine entries, exits, and confluence zones.
It highlights bullish and bearish gaps that remain open until price fills them, helping traders spot key liquidity imbalances used in Smart Money Concepts (SMC).
🔹 Features
Detects both bullish and bearish FVGs.
Auto-removes mitigated gaps once price returns to fill them.
Configurable gap size, line weight, and colors.
Optimized for performance with capped lookback and line control.
Works on all timeframes and markets.
Perfect for traders who rely on price action and institutional order flow to refine entries, exits, and confluence zones.
Phát hành các Ghi chú
Updates in this versionAdded max_bars_back=1000 to prevent history limit errors.
Adjusted the loop logic so offsets (idx+1 and idx-1) are always safe.
Fixed mitigation scan: replaced unsupported negative loop step with a safe forward-scan method.
Improved stability when scanning large lookback ranges (no more “historical offset” or “step must be greater than zero” errors).
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể tự do sử dụng tập lệnh mà không có bất kỳ hạn chế nào – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể tự do sử dụng tập lệnh mà không có bất kỳ hạn chế nào – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.