PROTECTED SOURCE SCRIPT

ORDER BLOCKS

113
This indicator automatically detects and visualizes bullish and bearish order blocks using swing-based price action logic.
It’s designed for traders who focus on market structure, displacement, and institutional-style footprints (ICT-style logic) — without the clutter of overlapping or stale zones.

🧩 Core Logic
- Swing Structure Detection
- Identifies swing highs and lows using left/right candle logic to isolate structural turning points.
- Order Block Detection
- Bullish OB forms when price displaces upward after a swing low, confirming demand imbalance.
- Bearish OB forms when price displaces downward after a swing high, confirming supply imbalance.
- Mitigation Logic (Close-Through Deletion)
- Blocks remain active until price closes fully through the opposite side, at which point they’re considered mitigated and removed.
- No Overlap Enforcement
- Ensures order blocks never overlap in price range. When a new OB overlaps an older one, the older block is automatically deleted to keep the chart clean and structurally accurate.

⚙️ Features
- Customizable Swing Sensitivity (Left/Right Bars)
- Adjust how many candles define a swing high or low.
- Adjustable Lookback Range (Scan Back Bars)
- Determines how far back the script looks for valid OB setups.
- Dynamic OB Management
- Automatically extends valid blocks and removes broken ones.
- Visual Options
- Custom colors for bullish/bearish OBs and text labels showing candle range (%).

🧠 Trading Use
- Bullish OBs highlight potential demand zones or areas of institutional accumulation.
- Bearish OBs highlight potential supply zones or areas of institutional distribution.
- Once price closes through an OB, it’s considered mitigated — meaning the imbalance has been filled.
- Non-overlapping logic keeps only the most relevant, active zones for clean structure-based analysis.

📈 Ideal For
- ICT-style traders
- Smart money concepts (SMC)
- Price action structure traders
- Scalpers or swing traders using imbalance-based confluence

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.