OPEN-SOURCE SCRIPT
Cập nhật Price Ranged FVG

📌 Price Ranged FVG
Is a clean and efficient tool designed to detect Fair Value Gaps (FVGs) with adjustable filters and structural context. It’s especially useful for traders looking to filter out insignificant gaps and focus on high-probability areas, particularly around swing breaks or structural shifts.
🧠 What is a Fair Value Gap (FVG)?
A Fair Value Gap appears when there’s a price imbalance between candles — typically after a strong move — where the market skips over certain price levels without trading there. These zones can act as potential areas for price to return to (mean reversion), or serve as support/resistance depending on market structure.
🔍 FVG Detection Types
You can choose between three different detection modes under the "FVG Detection" input:
🎯 FVG % Filters
To filter out noise or insignificant gaps, this indicator includes:
These filters help focus on relevant FVGs that are more likely to act as reaction zones.
🏛 Structural Context (Swing Highs and Lows)
The indicator plots swing highs and swing lows with dots to provide structure-based context:
These levels can help you determine whether an FVG is forming within a consolidation, breakout, or key structural transition.
✅ Use Case (My Personal Workflow)
I personally use this indicator to:
⚠️ Disclaimer
This indicator is not financial advice. It is a technical analysis tool intended to support your own decision-making process. Always do your own research and risk management.
Is a clean and efficient tool designed to detect Fair Value Gaps (FVGs) with adjustable filters and structural context. It’s especially useful for traders looking to filter out insignificant gaps and focus on high-probability areas, particularly around swing breaks or structural shifts.
🧠 What is a Fair Value Gap (FVG)?
A Fair Value Gap appears when there’s a price imbalance between candles — typically after a strong move — where the market skips over certain price levels without trading there. These zones can act as potential areas for price to return to (mean reversion), or serve as support/resistance depending on market structure.
🔍 FVG Detection Types
You can choose between three different detection modes under the "FVG Detection" input:
- Same Type: Only detects FVGs where the last 3 candles are in the same direction (all bullish or all bearish).
- All: Detects any FVG, regardless of candle direction.
- Twin Close: Detects FVGs only when the last two candles are in the same direction and close accordingly — offering a stricter confirmation.
🎯 FVG % Filters
To filter out noise or insignificant gaps, this indicator includes:
- Minimum FVG % Filter: Ignores FVGs smaller than your specified percentage of the current close.
- Maximum FVG % Filter: Ignores overly large gaps that may be unreliable or caused by anomalies.
These filters help focus on relevant FVGs that are more likely to act as reaction zones.
🏛 Structural Context (Swing Highs and Lows)
The indicator plots swing highs and swing lows with dots to provide structure-based context:
- Set Swing Strength to 3 for detecting internal structure (shorter-term moves).
- Use a higher setting like 5 to focus on external structure (more significant highs/lows).
These levels can help you determine whether an FVG is forming within a consolidation, breakout, or key structural transition.
✅ Use Case (My Personal Workflow)
I personally use this indicator to:
- Filter out weak or irrelevant FVGs using the % filters.
- Watch for price interaction at swing breaks — especially when an FVG aligns with a break in internal or external structure.
- Refine entry and exit planning in confluence with other tools or strategies.
⚠️ Disclaimer
This indicator is not financial advice. It is a technical analysis tool intended to support your own decision-making process. Always do your own research and risk management.
Phát hành các Ghi chú
What's new:- ⚙️ Max FVG Extension Filter
New option to limit how long FVGs extend across the chart.
▸ Can be turned ON/OFF
▸ Adjustable number of candles (default: 20)
▸ FVG becomes invalid once the max extension is reached
https://www.tradingview.com/x/4SqAs9FH/ - 🔔 FVG Alerts Added
▸ Alert when a new Bullish or Bearish FVG is created
▸ Alert when a Bullish or Bearish FVG reaches its max extension and stops updating
These additions improve control and flexibility when trading with FVGs.
Phát hành các Ghi chú
📊 Maximum FVG % Filter (now automatic)Replaces the manual max % setting with a dynamic filter based on the average price range over the last 100 candles (adjustable).
This makes the detection smoother and more consistent — no more tweaking needed per symbol or timeframe.
Phát hành các Ghi chú
📊 Max FVG % Table AddedThis update introduces a compact on-chart table that displays the current Maximum FVG % based on the selected number of bars.
You can customize the table's position, text color, border color, and font size directly from the input settings.
This allows for quick visual reference of the FVG filter threshold without needing to open the settings panel.
Let me know if you have feedback or suggestions for future improvements.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
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ã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
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.