Premium FVG Detector (Greg.Trading)💎 Premium FVG Detector
by Greg.Trading
🔍 Overview
The Premium FVG Detector is a professional-grade Fair Value Gap (FVG) identification and management tool, built for traders who rely on price inefficiencies, imbalance trading, and precision zones.
This indicator automatically detects bullish and bearish Fair Value Gaps, plots them directly on the chart, and intelligently manages each zone based on price interaction and invalidation logic.
Designed for clarity, performance, and real-world trading workflows.
📐 What Is a Fair Value Gap?
A Fair Value Gap (FVG) represents a price imbalance where the market moved too quickly, leaving inefficient trading behind.
These zones are commonly used by institutional and discretionary traders as:
Reaction zones
Continuation areas
Mean reversion targets
Liquidity draw locations
This indicator focuses on clean, rule-based FVG detection without repainting.
⚙️ What This Indicator Does
The Premium FVG Detector provides:
✔ Automatic detection of Bullish and Bearish FVGs
✔ Optional wick-based or body-based detection
✔ Minimum size filtering (in points)
✔ Clear visual zones with customizable colors
✔ Optional FVG size label (points) inside each zone
✔ Smart extension logic
✔ Automatic invalidation & cleanup
✔ Performance-safe zone management
🧠 Detection Logic (Conceptual)
The indicator detects Fair Value Gaps using a 3-candle price structure:
Bullish FVG:
When current price trades entirely above the high of two bars prior
Bearish FVG:
When current price trades entirely below the low of two bars prior
You can choose whether detection uses:
Full wicks (recommended for accuracy)
Candle bodies only (for stricter imbalance detection)
A minimum size filter ensures only meaningful gaps are plotted.
📦 Zone Extension & Management
Each FVG zone can be managed in one of two ways:
🔁 Fixed Extension
Zones extend a fixed number of bars to the right, ideal for:
Historical analysis
Backtesting concepts
⏳ Until Mitigated
Zones extend forward until price touches them, making them perfect for:
Live trading
Reaction-based strategies
A built-in maximum lifespan prevents clutter and preserves chart performance.
❌ Invalidation Logic (iFVG)
Zones are not removed on simple touches.
An FVG is only invalidated when:
Bullish FVG → price closes below the zone
Bearish FVG → price closes above the zone
This mirrors how many traders interpret inverted FVGs (iFVGs) in real markets.
🎨 Visual Customization
Fully customizable visuals allow the indicator to fit any chart style:
Separate controls for Bullish & Bearish zones
Adjustable fill and border transparency
Optional point-size labels
Smart label positioning to avoid overlap
All visuals are designed to remain clean, readable, and non-intrusive.
🚨 Alerts
Built-in alerts notify you when:
A new Bullish FVG forms
A new Bearish FVG forms
Perfect for multi-timeframe monitoring and hands-free analysis.
⭐ Why This Indicator Is Different
Unlike basic FVG scripts, this tool:
✅ Uses close-based invalidation, not wick noise
✅ Separates touch vs invalidation logic
✅ Offers dynamic zone lifecycle management
✅ Avoids repainting
✅ Is optimized for live trading performance
✅ Keeps charts clean with automatic pruning
It’s designed for traders who want structure, consistency, and control.
⚠️ Important Notes
• This indicator does not generate buy or sell signals
• It is intended as a market structure & imbalance tool
• Best used alongside a complete trading plan
Chỉ báo Pine Script®






















