PROTECTED SOURCE SCRIPT
ORDER BLOCKS

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
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
สคริปต์ที่ได้รับการป้องกัน
สคริปต์นี้ถูกเผยแพร่เป็นแบบ closed-source อย่างไรก็ตาม คุณสามารถใช้ได้อย่างอิสระและไม่มีข้อจำกัดใดๆ – เรียนรู้เพิ่มเติมได้ที่นี่
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน
สคริปต์ที่ได้รับการป้องกัน
สคริปต์นี้ถูกเผยแพร่เป็นแบบ closed-source อย่างไรก็ตาม คุณสามารถใช้ได้อย่างอิสระและไม่มีข้อจำกัดใดๆ – เรียนรู้เพิ่มเติมได้ที่นี่
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน