PROTECTED SOURCE SCRIPT
Dynamic FVG & Trap Zones

📘 Dynamic FVG & Trap Zones (DFTZ)
A Hybrid Model Combining Imbalance Mapping, Volume Behavior, and Trap Detection
Concept Overview
“Dynamic FVG & Trap Zones” is built to visualize real-time Fair Value Gaps (FVGs) and identify liquidity trap events inside those gaps using adaptive volume filters and wick-based logic.
Traditional FVG indicators merely mark imbalance zones between consecutive candles, but this model goes further — it measures how volume reaction and price penetration inside those zones reveal potential false moves or trap formations by smart money.
⚙️ How It Works
1. FVG Detection
• A Bullish FVG is detected when low > high[2], showing a price void left by aggressive buying.
• A Bearish FVG forms when high[1] < low[2], implying a selling imbalance.
• These zones are automatically drawn as semi-transparent boxes that extend forward for 10 bars and decay once they exceed the configurable lookback window.
2. Volume Normalization & Grading
• Every bar’s volume is compared against a dynamic SMA( volLookback ) average to calculate a Volume Grade = current vol / avg vol.
• Only bars exceeding the Min Volume Grade threshold are eligible to generate valid FVG zones, ensuring that low-participation moves are ignored.
• The Trap Volume Threshold sets how quiet the reaction bar must be (relative to average volume) to qualify as a trap event.
3. Trap Detection Logic
• Each active FVG zone monitors incoming candles.
• A potential trap is triggered when price re-enters the zone (body or wick depending on settings) but fails to expand with confirming volume.
• If the event occurs inside a Bullish FVG, it marks a Bear Trap (green zone turned red).
If it happens inside a Bearish FVG, it flags a Bull Trap (red zone turned green).
• This reversal in zone color visually conveys trapped liquidity and potential directional fade.
4. Exclusivity and Cooldown Control
• To avoid signal clustering, you can choose exclusivity modes:
Allow Both, Bear over Bull, or Bull over Bear.
• A built-in per-signal cooldown timer prevents back-to-back plots of the same type, enhancing signal clarity during rapid price action.
5. Adaptive Visualization
• Wick-based vs body-based trap detection (toggleable).
• Optional cooldown filtering on shapes ensures the chart only displays validated events.
• Old FVG boxes are pruned automatically beyond the chosen lookback horizon.
🧠 Why It’s Different
Unlike static FVG detectors or simple liquidity sweep tools, DFTZ blends:
• Volume context (Smart Volume Grade filtering)
• Behavioral trap detection within imbalance zones
• Dynamic cooldown mechanics that control over-signaling
• Forward-propagating zones that self-expire gracefully
This synergy makes it a compact yet powerful tool for visualizing imbalances + liquidity traps in one framework — ideal for discretionary traders combining SMC concepts with volume analytics.
📈 How to Use
• Primary Context: Use on 15 min to 1 h charts to spot active FVG zones forming after impulsive moves.
• Trap Signal Interpretation:
• 🔴 “Trap” below bar → Bullish reversal (Bear Trap).
• 🟢 “Trap” above bar → Bearish reversal (Bull Trap).
• Combine With: Market structure breaks, VWAP, or delta volume tools to confirm true reversal intent.
• Alerts: All major events (FVG creation & trap confirmation) trigger ready-to-use alerts for automation or back-testing.
🧩 Customization
Setting Function
Max FVG Lookback Controls how long old zones remain active.
Volume SMA Period Defines the baseline for volume grading.
Min Volume Grade & Trap Volume Threshold Tune the sensitivity of trap confirmation.
Wick-Based Trap Detection Enable to capture wick rejections inside zones.
Signal Cooldown Prevents rapid multiple plots on successive bars.
⚠️ Disclaimer
This tool is designed for educational and analytical purposes only. It does not constitute financial advice or guarantee trading performance. Always conduct your own analysis and risk management before entering a position.
A Hybrid Model Combining Imbalance Mapping, Volume Behavior, and Trap Detection
Concept Overview
“Dynamic FVG & Trap Zones” is built to visualize real-time Fair Value Gaps (FVGs) and identify liquidity trap events inside those gaps using adaptive volume filters and wick-based logic.
Traditional FVG indicators merely mark imbalance zones between consecutive candles, but this model goes further — it measures how volume reaction and price penetration inside those zones reveal potential false moves or trap formations by smart money.
⚙️ How It Works
1. FVG Detection
• A Bullish FVG is detected when low > high[2], showing a price void left by aggressive buying.
• A Bearish FVG forms when high[1] < low[2], implying a selling imbalance.
• These zones are automatically drawn as semi-transparent boxes that extend forward for 10 bars and decay once they exceed the configurable lookback window.
2. Volume Normalization & Grading
• Every bar’s volume is compared against a dynamic SMA( volLookback ) average to calculate a Volume Grade = current vol / avg vol.
• Only bars exceeding the Min Volume Grade threshold are eligible to generate valid FVG zones, ensuring that low-participation moves are ignored.
• The Trap Volume Threshold sets how quiet the reaction bar must be (relative to average volume) to qualify as a trap event.
3. Trap Detection Logic
• Each active FVG zone monitors incoming candles.
• A potential trap is triggered when price re-enters the zone (body or wick depending on settings) but fails to expand with confirming volume.
• If the event occurs inside a Bullish FVG, it marks a Bear Trap (green zone turned red).
If it happens inside a Bearish FVG, it flags a Bull Trap (red zone turned green).
• This reversal in zone color visually conveys trapped liquidity and potential directional fade.
4. Exclusivity and Cooldown Control
• To avoid signal clustering, you can choose exclusivity modes:
Allow Both, Bear over Bull, or Bull over Bear.
• A built-in per-signal cooldown timer prevents back-to-back plots of the same type, enhancing signal clarity during rapid price action.
5. Adaptive Visualization
• Wick-based vs body-based trap detection (toggleable).
• Optional cooldown filtering on shapes ensures the chart only displays validated events.
• Old FVG boxes are pruned automatically beyond the chosen lookback horizon.
🧠 Why It’s Different
Unlike static FVG detectors or simple liquidity sweep tools, DFTZ blends:
• Volume context (Smart Volume Grade filtering)
• Behavioral trap detection within imbalance zones
• Dynamic cooldown mechanics that control over-signaling
• Forward-propagating zones that self-expire gracefully
This synergy makes it a compact yet powerful tool for visualizing imbalances + liquidity traps in one framework — ideal for discretionary traders combining SMC concepts with volume analytics.
📈 How to Use
• Primary Context: Use on 15 min to 1 h charts to spot active FVG zones forming after impulsive moves.
• Trap Signal Interpretation:
• 🔴 “Trap” below bar → Bullish reversal (Bear Trap).
• 🟢 “Trap” above bar → Bearish reversal (Bull Trap).
• Combine With: Market structure breaks, VWAP, or delta volume tools to confirm true reversal intent.
• Alerts: All major events (FVG creation & trap confirmation) trigger ready-to-use alerts for automation or back-testing.
🧩 Customization
Setting Function
Max FVG Lookback Controls how long old zones remain active.
Volume SMA Period Defines the baseline for volume grading.
Min Volume Grade & Trap Volume Threshold Tune the sensitivity of trap confirmation.
Wick-Based Trap Detection Enable to capture wick rejections inside zones.
Signal Cooldown Prevents rapid multiple plots on successive bars.
⚠️ Disclaimer
This tool is designed for educational and analytical purposes only. It does not constitute financial advice or guarantee trading performance. Always conduct your own analysis and risk management before entering a position.
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
Thanks.
TradeTech Analysis
Telegram Channel - t.me/Tradetech2024
Youtube Channel - youtube.com/@TradeTechAnalysis
Website - tradetechanalysis.com/
Super Profile - superprofile.bio/tradetechanalysis
TradeTech Analysis
Telegram Channel - t.me/Tradetech2024
Youtube Channel - youtube.com/@TradeTechAnalysis
Website - tradetechanalysis.com/
Super Profile - superprofile.bio/tradetechanalysis
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.
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
Thanks.
TradeTech Analysis
Telegram Channel - t.me/Tradetech2024
Youtube Channel - youtube.com/@TradeTechAnalysis
Website - tradetechanalysis.com/
Super Profile - superprofile.bio/tradetechanalysis
TradeTech Analysis
Telegram Channel - t.me/Tradetech2024
Youtube Channel - youtube.com/@TradeTechAnalysis
Website - tradetechanalysis.com/
Super Profile - superprofile.bio/tradetechanalysis
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.