PROTECTED SOURCE SCRIPT
GOLD – OB Clean + Internal/External Market Structure [Dragos]

GOLD – OB Clean + Internal/External Market Structure [Dragos]
All-in-one tool for XAUUSD that combines:
Clean Order Blocks (Supply/Demand) derived from the last opposite candle after a BOS (break of structure)
Internal & External Market Structure (CHoCH/BOS) with lines and labels
Visual zone management: right extension, mitigation (first touch), invalidation (close beyond), and 50% midline
How it works
Structure & BOS
Finds pivots (HH/LL) via Pivot len.
Triggers BOS when price crosses the last confirmed swing.
Order Blocks
On BOS, scans the last N bars for the opposite candle (bear for BOS up / bull for BOS down) and draws the OB:
Green = Demand, Red = Supply
Optional: use wicks (high/low) or just the body (open/close).
Mitigation: on first touch the zone fades or hides (per settings).
Invalidation: if price closes beyond the zone, it turns gray or gets removed (per settings).
Midline: 50% line for refined management (partial entries, R/R, etc.).
Internal / External Structure
Two structure layers: Internal (micro, shorter swing) and External (macro, longer swing).
Displays CHoCH/BOS with labels; External lines can be dashed for clarity.
Choose to show Internal, External, or Both.
Key Settings
Structure
Pivot len (swing HH/LL) — pivot sensitivity.
Order Blocks
Lookback N bars for the opposite candle
Use wicks — if on, zone uses high/low; otherwise just the body.
Zone Management
Extend zones to the right
Hide zone after mitigation (touch)
Fade zone after mitigation
Remove zone when invalidated
Show 50% line
Max zones stored
Colors: fill/border for Demand/Supply, 50% line color, Mitigated/Invalidated colors.
General
Only on XAU/GOLD (optional) — restricts execution to symbols containing “XAU”/“GOLD”.
Market Structure (tab)
Internal Swing Length / External Swing Length
Show Internal/External Market Structure (Both / Internal / External)
Colors for bullish/bearish MS
Usage Guide
Recommended timeframes: M5/M15 for entries, H1 for context.
Workflow:
Determine External (macro) direction.
Look for BOS and OB in the same direction on Internal.
Wait for mitigation (touch) inside the OB; the 50% line can be used for conservative entries.
Good confluences: sessions (killzones), volume spikes, extreme RSI, MAs (add as separate indicators if needed).
Visual Conventions
Demand: green; Supply: red.
Mitigated: faded yellow (or hidden if chosen).
Invalidated: gray (or removed).
50% line: gray.
Notes & Limits
Pine v6. Object caps follow TradingView limits (max_* = 500). On long histories, increase “Max zones stored” carefully.
BOS is computed when price crosses the last confirmed swing; some traders prefer “close-only” confirmation (can be customized if desired).
This tool does not auto-generate BUY/SELL signals; it’s a context & zones assistant.
Risk disclaimer: Trading involves risk. This tool is for educational analysis and does not guarantee profit. Use strict risk management (fixed SL, R:R ≥ 1:2, risk < 1% per trade).
All-in-one tool for XAUUSD that combines:
Clean Order Blocks (Supply/Demand) derived from the last opposite candle after a BOS (break of structure)
Internal & External Market Structure (CHoCH/BOS) with lines and labels
Visual zone management: right extension, mitigation (first touch), invalidation (close beyond), and 50% midline
How it works
Structure & BOS
Finds pivots (HH/LL) via Pivot len.
Triggers BOS when price crosses the last confirmed swing.
Order Blocks
On BOS, scans the last N bars for the opposite candle (bear for BOS up / bull for BOS down) and draws the OB:
Green = Demand, Red = Supply
Optional: use wicks (high/low) or just the body (open/close).
Mitigation: on first touch the zone fades or hides (per settings).
Invalidation: if price closes beyond the zone, it turns gray or gets removed (per settings).
Midline: 50% line for refined management (partial entries, R/R, etc.).
Internal / External Structure
Two structure layers: Internal (micro, shorter swing) and External (macro, longer swing).
Displays CHoCH/BOS with labels; External lines can be dashed for clarity.
Choose to show Internal, External, or Both.
Key Settings
Structure
Pivot len (swing HH/LL) — pivot sensitivity.
Order Blocks
Lookback N bars for the opposite candle
Use wicks — if on, zone uses high/low; otherwise just the body.
Zone Management
Extend zones to the right
Hide zone after mitigation (touch)
Fade zone after mitigation
Remove zone when invalidated
Show 50% line
Max zones stored
Colors: fill/border for Demand/Supply, 50% line color, Mitigated/Invalidated colors.
General
Only on XAU/GOLD (optional) — restricts execution to symbols containing “XAU”/“GOLD”.
Market Structure (tab)
Internal Swing Length / External Swing Length
Show Internal/External Market Structure (Both / Internal / External)
Colors for bullish/bearish MS
Usage Guide
Recommended timeframes: M5/M15 for entries, H1 for context.
Workflow:
Determine External (macro) direction.
Look for BOS and OB in the same direction on Internal.
Wait for mitigation (touch) inside the OB; the 50% line can be used for conservative entries.
Good confluences: sessions (killzones), volume spikes, extreme RSI, MAs (add as separate indicators if needed).
Visual Conventions
Demand: green; Supply: red.
Mitigated: faded yellow (or hidden if chosen).
Invalidated: gray (or removed).
50% line: gray.
Notes & Limits
Pine v6. Object caps follow TradingView limits (max_* = 500). On long histories, increase “Max zones stored” carefully.
BOS is computed when price crosses the last confirmed swing; some traders prefer “close-only” confirmation (can be customized if desired).
This tool does not auto-generate BUY/SELL signals; it’s a context & zones assistant.
Risk disclaimer: Trading involves risk. This tool is for educational analysis and does not guarantee profit. Use strict risk management (fixed SL, R:R ≥ 1:2, risk < 1% per trade).
보호된 스크립트입니다
이 스크립트는 비공개 소스로 게시됩니다. 하지만 제한 없이 자유롭게 사용할 수 있습니다 — 여기에서 자세히 알아보기.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
보호된 스크립트입니다
이 스크립트는 비공개 소스로 게시됩니다. 하지만 제한 없이 자유롭게 사용할 수 있습니다 — 여기에서 자세히 알아보기.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.