OPEN-SOURCE SCRIPT
Order Block Detector PRO [V3.1]

═══════════════════════════════════════════════
APEX OB — Multi-Swing OTE + Structure Pro
═══════════════════════════════════════════════
The first Order Block detector with Multi-Swing OTE confluence.
Forked from LuxAlgo's OB Detector, rebuilt from the ground up for serious ICT/SMC traders.
◆ WHY THIS INDICATOR ◆
Most OB indicators treat every Order Block the same. Apex OB scores each one from 0 to 100 based on six adaptive components, then ranks it as MONSTER / STRONG / NORMAL / WEAK so you instantly know which OBs deserve your attention. Combined with Multi-Swing OTE detection and clean BOS/CHoCH validation by close, you get an institutional-grade tool that filters out 80% of low-quality setups.
◆ KEY FEATURES ◆
▸ Scoring System 0-100 (asset-adaptive)
• Forex/Metals : Volume 30 + Session 20 + Displacement 25 + Freshness 15 + Purity 10
• Crypto : Volume 40 + Displacement 35 + Freshness 15 + Purity 10 (no session)
• Bonus FVG +5, Bonus OTE +5 to +10
▸ Visual Tier Hierarchy
• ★ MONSTER (≥85) — Gold border, premium setup
• ◆ STRONG (70-84) — High confidence
• • NORMAL (40-69) — Valid context
• · WEAK (<40) — Filtered or muted
▸ Multi-Swing OTE Detection (UNIQUE)
Tests every OB against 3 pivot lengths in parallel (5/10/20 by default).
• 1 match → OTE
• 2 matches → OTE×2
• 3 matches → OTE×3 (rare premium confluence across all timeframes)
▸ Fair Value Gap Detection
3-bar FVG pattern automatically detected on every OB and tagged.
▸ Structure Breaks (BOS / CHoCH) Dual-Pivot
• Internal structure (pivot 3) — dotted lines, scalp timing
• Major structure (pivot 10) — solid lines, swing context
• Validated 100% by close (no wick fakeouts)
• Auto-distinction BOS (continuation) vs CHoCH (reversal)
▸ Asset Auto-Detection
Auto-detects Crypto vs Forex/Metals based on symbol. Manual override available.
▸ Mitigation Tracking
Mitigated OBs fade to gray automatically. Choose Wick or Close mitigation.
▸ HUD Dashboard
Live tracking of Structure / HTF Bias (configurable TF) / Last Signal.
◆ HOW TO USE ◆
1. Add to chart (works on all timeframes, optimized for M1 to H4).
2. Watch for OBs with score ≥70 (STRONG+) in your trading direction.
3. Prioritize entries on OBs flagged with FVG and/or OTE×2 / OTE×3.
4. Use BOS/CHoCH MAJOR signals to confirm structural shifts.
5. Check the HUD for instant context : are you aligned with HTF bias?
◆ RECOMMENDED SETTINGS ◆
XAUUSD / FX Majors — M3 / M5 scalping :
• Pivot Length : 5
• Internal pivot : 3 | Major pivot : 10
• OTE pivots : 5 / 10 / 20
• Min score : 60 (only NORMAL+)
• Mitigation : Close
BTCUSD / Crypto — M15 / H1 :
• Pivot Length : 5
• Min score : 50
• Asset mode : Crypto (or Auto)
Higher timeframes (H1+) :
• Increase pivot lengths proportionally
• Min score : 70
◆ A+ SETUP CHECKLIST ◆
✓ OB tier : ★ MONSTER or ◆ STRONG
✓ Score ≥ 80
✓ FVG tag present
✓ OTE×2 or OTE×3 (multi-timeframe confluence)
✓ Aligned with HTF bias (check HUD)
✓ Recent CHoCH Major in same direction
✓ During session killzone (London 9h-12h CET or NY 14h30-17h CET)
◆ CREDITS ◆
Original OB detection logic forked from LuxAlgo's open-source "Order Block Detector".
Multi-Swing OTE, scoring system, structure breaks, asset adaptive engine and visual hierarchy by Valentin.
Published under CC BY-NC-SA 4.0 — free to use, modify and share with attribution. Commercial redistribution prohibited.
═══════════════════════════════════════════════
Disclaimer : not financial advice. Order Blocks are a technical concept — no indicator predicts the future. Always backtest on your asset/timeframe and use proper risk management. Past performance ≠ future results.
═══════════════════════════════════════════════
APEX OB — Multi-Swing OTE + Structure Pro
═══════════════════════════════════════════════
The first Order Block detector with Multi-Swing OTE confluence.
Forked from LuxAlgo's OB Detector, rebuilt from the ground up for serious ICT/SMC traders.
◆ WHY THIS INDICATOR ◆
Most OB indicators treat every Order Block the same. Apex OB scores each one from 0 to 100 based on six adaptive components, then ranks it as MONSTER / STRONG / NORMAL / WEAK so you instantly know which OBs deserve your attention. Combined with Multi-Swing OTE detection and clean BOS/CHoCH validation by close, you get an institutional-grade tool that filters out 80% of low-quality setups.
◆ KEY FEATURES ◆
▸ Scoring System 0-100 (asset-adaptive)
• Forex/Metals : Volume 30 + Session 20 + Displacement 25 + Freshness 15 + Purity 10
• Crypto : Volume 40 + Displacement 35 + Freshness 15 + Purity 10 (no session)
• Bonus FVG +5, Bonus OTE +5 to +10
▸ Visual Tier Hierarchy
• ★ MONSTER (≥85) — Gold border, premium setup
• ◆ STRONG (70-84) — High confidence
• • NORMAL (40-69) — Valid context
• · WEAK (<40) — Filtered or muted
▸ Multi-Swing OTE Detection (UNIQUE)
Tests every OB against 3 pivot lengths in parallel (5/10/20 by default).
• 1 match → OTE
• 2 matches → OTE×2
• 3 matches → OTE×3 (rare premium confluence across all timeframes)
▸ Fair Value Gap Detection
3-bar FVG pattern automatically detected on every OB and tagged.
▸ Structure Breaks (BOS / CHoCH) Dual-Pivot
• Internal structure (pivot 3) — dotted lines, scalp timing
• Major structure (pivot 10) — solid lines, swing context
• Validated 100% by close (no wick fakeouts)
• Auto-distinction BOS (continuation) vs CHoCH (reversal)
▸ Asset Auto-Detection
Auto-detects Crypto vs Forex/Metals based on symbol. Manual override available.
▸ Mitigation Tracking
Mitigated OBs fade to gray automatically. Choose Wick or Close mitigation.
▸ HUD Dashboard
Live tracking of Structure / HTF Bias (configurable TF) / Last Signal.
◆ HOW TO USE ◆
1. Add to chart (works on all timeframes, optimized for M1 to H4).
2. Watch for OBs with score ≥70 (STRONG+) in your trading direction.
3. Prioritize entries on OBs flagged with FVG and/or OTE×2 / OTE×3.
4. Use BOS/CHoCH MAJOR signals to confirm structural shifts.
5. Check the HUD for instant context : are you aligned with HTF bias?
◆ RECOMMENDED SETTINGS ◆
XAUUSD / FX Majors — M3 / M5 scalping :
• Pivot Length : 5
• Internal pivot : 3 | Major pivot : 10
• OTE pivots : 5 / 10 / 20
• Min score : 60 (only NORMAL+)
• Mitigation : Close
BTCUSD / Crypto — M15 / H1 :
• Pivot Length : 5
• Min score : 50
• Asset mode : Crypto (or Auto)
Higher timeframes (H1+) :
• Increase pivot lengths proportionally
• Min score : 70
◆ A+ SETUP CHECKLIST ◆
✓ OB tier : ★ MONSTER or ◆ STRONG
✓ Score ≥ 80
✓ FVG tag present
✓ OTE×2 or OTE×3 (multi-timeframe confluence)
✓ Aligned with HTF bias (check HUD)
✓ Recent CHoCH Major in same direction
✓ During session killzone (London 9h-12h CET or NY 14h30-17h CET)
◆ CREDITS ◆
Original OB detection logic forked from LuxAlgo's open-source "Order Block Detector".
Multi-Swing OTE, scoring system, structure breaks, asset adaptive engine and visual hierarchy by Valentin.
Published under CC BY-NC-SA 4.0 — free to use, modify and share with attribution. Commercial redistribution prohibited.
═══════════════════════════════════════════════
Disclaimer : not financial advice. Order Blocks are a technical concept — no indicator predicts the future. Always backtest on your asset/timeframe and use proper risk management. Past performance ≠ future results.
═══════════════════════════════════════════════
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.