🏛️ Institutional SMC Logic & Auction Market Thesis
The highest-conviction reversals occur when a liquidity sweep is immediately followed by violent displacement that leaves an open Fair Value Gap. Populating source_displacement_score in FVGDetector and enforcing proximity-weighted location scoring unlocked a high-conviction +₹765.00 reversal winner in Stage 4.
🚀 5-Stage Production Audit & Latest Architectural Upgrades (Oct 2026)
Forensic progression across the 14-session production dataset (Oct 06 – Oct 23, 2026) from Legacy Baseline (Stage 0) through Stage 4 Peer Review & Calibration.
| Upgrade Stage & Identifier | Codebase Modification & Quantified Production Impact |
|---|---|
| Stage 4 · PR #6 & #10b (FVG source_displacement_score & O(N) Scan) | Populated source_displacement_score = min(1.0, (mid_range / avg_range) * 0.5) inside FVGDetector.detect() and wired scan_window() in fyers_feed.py, enabling LiquiditySweepFVG to score post-sweep displacement accurately (+₹765.00 winner unlocked). |
| Stage 4 · PR #8 (Proximity-Gated Location Score) | Gated the 0.80 location score in setup_generator.py by actual distance to the swept liquidity pool (<= 1.2x ATR), preventing over-scoring on extended entries. |
| Stage 1 & 3 · Counter-Trend Filter & Debounce Fix | Eliminated 1 counter-trend loss in Stage 1 (+₹661.50) and fixed same-bar debounce in Stage 3. |
🔍 Phase 1: 1. Liquidity Pool Purge
Key swing high/low or PDH/PDL is swept, triggering resting stop orders.
⚙️ Quantitative Quality Gates & Stage 4 Entry Filters
The strategy enforces strict fail-fast validation before computing the single-pass multi-factor confluence score:
| Filter / Quality Gate | Condition & Mathematical Threshold | Operational Impact & Protection |
|---|---|---|
| Sweep + FVG Window | Sweep & FVG formed within max_lookback_bars = 3 | Requires immediate post-sweep institutional displacement |
| Displacement Score (PR #10b) | fvg.source_displacement_score verified > 0 | Scores true candle expansion relative to 10-bar average |
| Extension & Departure Cap | Departure <= 0.4x ATR AND Extension <= 2.0x ATR | Prevents chasing late, over-extended post-sweep moves |
| Proximity Location Gate (PR #8) | Distance to Swept Pool <= 1.2x ATR for 0.80 Score | Ensures entry remains anchored near structural invalidation |
| Option-Space R:R Gate (PR #4) | Option R:R >= 1.60R (Gate 6 Verified) | Guarantees asymmetric option payoff |
🛑 Risk Geometry & 2-Lot Profit Booking Execution
LOT_SIZE) scaled by setup.heat_multiplier (1.40x / 1.20x Top-Spine, 1.35x / 1.15x Standard, 0.75x Capped) and gated by min_reward_risk_ratio: 1.60 in option-premium space.
🎯 Option Strike & DTE-Aligned Greeks Architecture
ExchangeCalendar.
LiquiditySweepFVGStrategySource File:
nifty_expansion_runner/strategies/liquidity_sweep_fvg.py