OBFVG Auto Draw
- Indicadores
- Nawal Kishor Yadav
- Versão: 1.0
- Ativações: 5
OB + FVG Zones Pro — Order Block & Fair Value Gap Renderer
Automatically identify, classify, and visualize institutional price zones on any symbol and timeframe.
What it does
OB + FVG Zones Pro scans price action and highlights two of the most powerful concepts used in Smart Money and ICT-based trading: Order Blocks (OBs) and Fair Value Gaps (FVGs). Every zone is graded, color-coded, tracked for mitigation, and extended to the right edge of the chart so you always know which zones are still active.
Order Block Detection
The indicator detects three tiers of Order Blocks:
- ★ Extra-Strong — oversized candle body (> 2× ATR) or confirmed by a nested structure on the lower timeframe. These are the rarest and highest-probability zones.
- Strong — classic counter-trend candle followed by a large impulse move.
- Weak — same structure with a same-direction candle. Useful for confluence, can be hidden if preferred.
A swing-pivot filter ensures the OB sits at a genuine market turning point, not in the middle of a trend. An ATR-based size filter removes insignificant micro-zones that clutter the chart.
Fair Value Gap Detection
Both bullish and bearish FVGs are detected across the full lookback window. Each FVG shrinks dynamically as price partially fills it — when the gap begins to close from one side but has not yet been fully mitigated, the zone is reclassified as a Breakaway Gap and recolored to signal reduced but residual inefficiency.
Mitigation & Touch Tracking
Every zone is monitored bar-by-bar after its creation:
- An OB is mitigated when a candle closes beyond its opposing edge.
- An FVG is mitigated when price closes beyond its original boundary.
- Touch count is displayed inside each zone label so you can immediately see how many times price has revisited a level.
- Over-touched zones (> 3 touches) are automatically removed as they are considered consumed.
- Mitigated zones can be shown or hidden. When shown, only the single nearest mitigated zone to current price is kept to avoid visual clutter.
Display & Customisation
All zone colours are individually configurable from the inputs panel — no need to edit source code:
- Bullish OB: Extra-Strong / Strong / Weak — separate colour for each
- Bearish OB: Extra-Strong / Strong / Weak — separate colour for each
- Bullish FVG, Bearish FVG, Breakaway Gap — separate colour for each
- Mitigated zones — unified muted colour
Each zone renders as a filled rectangle with a configurable border style (solid, dashed, dotted) and border width. A 50% midline is drawn across every zone. An optional mid-price label appears at the right edge of each zone. Zone labels display the type name, mitigation status, and touch count.
Key Settings
| Parameter | Default | Range |
|---|---|---|
| Lookback bars | 500 | 10 – 5 000 |
| Impulse min body % | 38 % | 1 – 99 |
| Swing pivot bars | 2 | 1 – 20 |
| Max zones tracked | 200 | 5 – 500 |
| Extend right (bars) | 60 | 1 – 500 |
| ATR period | 14 | 2 – 200 |
| ATR minimum multiplier | 0.10 | — |
Performance & Compatibility
- Works on all symbols and all timeframes.
- ATR is calculated internally — no external indicator handles required.
- Rendering is skipped automatically during Strategy Tester optimisation passes to keep backtesting fast.
- All input values are validated on load with clear error messages.
- Fully compliant with MQL5 Market tester requirements. Implements OnTester() .
- Objects are prefixed and cleaned up completely on removal.
Ideal For
Traders who base entries on institutional order flow, Smart Money Concepts, Inner Circle Trader (ICT) methodology, supply and demand, or any approach that relies on identifying where large participants placed orders and whether those levels have been revisited.
No repainting. No external dependencies. One-click attach to chart.
