OPEN-SOURCE SCRIPT
Updated 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.
Release Notes
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.website/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.
Release Notes
📊 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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
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.