מעודכן

SMC Structure, Liquidity & OTE Pro [W.AIgo]

6 489
SMC Structure, Liquidity & OTE Pro [W.AIgo]

A pure institutional market structure, liquidity, and dealing-range mapping engine built in Pine Script® v6 (UDT architecture). Designed for objective chart interpretation and visual clarity — with zero noisy buy/sell entry dots.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
◈ CORE DESIGN PHILOSOPHY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Most conventional Smart Money overlays suffer from four structural flaws:
1. Fixed-lookback pivot lag that misses rapid trend shifts and misreads inside-bar chop as structure.
2. Stale historical swing anchors that lock the Premium/Discount range on outdated legs.
3. Visual clutter caused by overlapping Order Blocks, stacked Equal Highs/Lows, and colliding right-margin labels.
4. Coupled display logic where hiding Fair Value Gaps silently breaks dashboard confluence scoring.

SMC Structure, Liquidity & OTE Pro solves these issues from the ground up with a mechanical directional-inclusion structure core, a 4-tier visual hierarchy, and a dedicated right-margin layout engine.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
◈ ARCHITECTURAL MODULES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

1. Mechanical Directional-Inclusion Stroke Engine
• Replaces fixed-window pivot detection with directional inside/outside bar merging and strict minimum merged-bar separation (Agile 4-Bar / Standard 5-Bar / Filtered 6-Bar).
• Applies an ATR-normalized minimum swing amplitude filter so shallow consolidation chop is separated from major structural impulses.
• Optional Institutional Balance Range highlights 3-stroke structural overlap areas where resting liquidity accumulates.

2. Protected Structure, 2nd-Wave Shifts & Inducement (IDM)
• Distinguishes true Break of Structure (BOS) and Change of Character (CHoCH) from internal pullback Inducement (IDM).
• Tracks Protected Anchors (STRONG LOW / STRONG HIGH) at the true wave origin while incorporating a 2nd-wave structural shift rule (confirmed LH + LL in uptrends, HL + HH in downtrends) to prevent ancient historical levels from locking out new trends.
• Automatically clears stale IDM rays upon every structural break so the active leg remains spotless.

3. 4-Tier Visual Zone Engine (OB → Breaker · FVG → Wireframe IFVG)
• Tier 1 — Order Blocks (OB+ / OB-): Supports both "Extreme Origin" (wave extreme opposite candle opposite candle) and "Displacement Origin" (expansion launch candle) algorithms, annotated with relative volume multiplier (e.g., 2.4x).
• Tier 2 — Fair Value Gaps (FVG+ / FVG-): ATR-filtered imbalance zones with 50% equilibrium midlines. Fully decoupled from visual toggles — hiding FVG boxes keeps internal scoring and IFVG alerts 100% active.
• Tier 3 — Breaker Blocks (BB+ / BB-): Violated OBs transition automatically into dashed Breaker Blocks with 45% overlap deduplication.
• Tier 4 — Wireframe Inversion FVGs (IFVG+ / IFVG-): Violated FVGs flip into lightweight dotted wireframes (no background fill) so secondary zones never overpower primary OB/FVG areas.
• Every tier maintains an independent FIFO memory cap to preserve clean chart auto-scaling.

4. Deduplicated Multi-Swing Liquidity Pools
• Scans the recent 6 swing highs/lows to detect resting Buy-Side Liquidity (EQH · BSL) and Sell-Side Liquidity (EQL · SSL) using smoothed-ATR tolerance deduplication.
• Tracks single-swing stop hunts (✕ BSL / ✕ SSL) without body breaks.
• Automatically trims swept liquidity lines upon capture and purges excessive historical markers to keep candlesticks unobstructed.

5. Dynamic Dealing Range, Configurable OTE & Anti-Collision Layout
• Dynamically locks Premium (PREM), Equilibrium (EQ 50%), Discount (DISC), and the Optimal Trade Entry (OTE) pocket to the active structural leg.
• OTE boundaries are fully customizable down to 0.001 precision (default: 0.618 – 0.705) and synchronize in real time with both the right-margin ruler and telemetry HUD.
• A dedicated right-margin lane separates the P/D ruler from extended zones, backed by a greedy vertical anti-collision solver (priority: OB > BB > Liquidity/IDM > FVG > IFVG) to prevent overlapping text labels.

6. Non-Repainting HTF Context, Orderflow Telemetry & Bilingual HUD
• Higher Timeframe (HTF) Bias evaluates strictly confirmed HTF bars (locked to the prior closed HTF bar during realtime execution) and includes automatic timeframe validation (displays "HTF <= Chart" if the selected HTF is not higher than the active chart).
• Stroke-level Orderflow Energy compares consecutive directional impulse momentum to report expansion vs. exhaustion (e.g., Sell Exhausted · Absorbing).
• Compact 9-row Telemetry HUD displays a 0–100 structural alignment progress bar (▰▱), active zone counts, liquidity decay status, and a real-time Context Readout. Includes a one-click language switch (English / 繁體中文).

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
◈ PRACTICAL INTERPRETATION WORKFLOW
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

1. Establish Macro Bias: Check "HTF Bias" and "Major Swing" in the HUD to align with the dominant orderflow direction.
2. Locate Value: Observe the right-margin Dealing Range ruler. In bullish structure, wait patiently for price to retrace below EQ 50% into Discount or the gold-bordered OTE pocket (and vice versa for bearish structure).
3. Track Liquidity Fuel: Watch for an Inducement (IDM ✕) or Equal Low/High sweep prior to zone mitigation.
4. Monitor Zone Reaction & Exhaustion: Observe price interaction with overlapping OB / BB / FVG / IFVG zones while checking "Orderflow" for opposing pressure exhaustion.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
◈ ALERTS & OTE TRIGGER MODES (13 CONDITIONS)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Includes 13 built-in alert conditions covering OTE Zone Entry (Any / Bullish / Bearish), BOS, CHoCH, IDM Sweep, BSL/SSL Sweep, IFVG Inversion, and OB/BB Taps.

• OTE Edge-Triggered Anti-Spam Lock: Once price enters the OTE zone, the alert fires once and stays locked until price exits the pocket or a new structural break resets the dealing range.
• Wick Touch (Realtime): Fires immediately when price wicks into OTE — set TradingView alert frequency to "Once Per Bar".
• Confirmed Close: Fires only when a candle closes inside OTE — set TradingView alert frequency to "Once Per Bar Close".

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
◈ TECHNICAL NOTES & NON-REPAINTING DISCLOSURE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

• Confirmed Execution: All structural breaks (BOS/CHoCH), internal breaks, OB/BB/FVG/IFVG state transitions, and liquidity sweeps are evaluated strictly on barstate.isconfirmed.
• HTF Stability: Realtime HTF outputs reference the last confirmed HTF bar to prevent intrabar repainting.
• Time-Based Anchoring (xloc.bar_time): All visual objects anchor to bar timestamps to eliminate historical buffer errors on deep histories. On non-24/7 markets (equities/forex), right-margin extensions may appear slightly compressed right before weekend market closures.
• Disclaimer: This open-source script is an objective analytical and visualization tool for educational purposes only and does not constitute financial advice.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
◈ CONCEPT CREDITS & LICENSE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Smart Money Concepts terminology (BOS, CHoCH, Order Blocks, Breaker Blocks, FVG/IFVG, Inducement, Liquidity Pools, Premium/Discount, and OTE) builds upon classical Richard D. Wyckoff market structure principles and modern institutional price action frameworks (ICT / SMC). All mechanical inclusion logic, UDT data structures, zone deduplication engines, anti-collision layout algorithms, and Pine Script® v6 code are original work released under the Mozilla Public License 2.0 (MPL 2.0).
הערות שחרור
Update — Telemetry HUD Font Scale:
• Replaced the binary compact toggle with a 3-tier "HUD Font Scale" selector: 0.7x (Compact), 0.8x (Small), and 1.0x (Normal).
• Updated default HUD font scale to 0.8x (Small) for improved readability across high-DPI desktop and mobile displays.

כתב ויתור

המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.