OPEN-SOURCE SCRIPT
Order Blocks (Lite & Strict) [VBS]

VictoryByStrategy • Order Blocks ONLY (Lite & Strict) is a clean and focused Order Block indicator designed for traders who prefer clarity over clutter.
Unlike multi-layered “SMC dashboards” that overload the chart with structure, gaps, liquidity, and internal shifts, this script does one thing — and does it well:
Detects strict bullish and bearish Order Blocks based on confirmed swing breaks.
This version is intentionally lightweight:
* Maximum 3–5 active Order Blocks
* Strict mitigation rules
* Dynamic visibility (text only appears when price is inside the zone)
* Automatic invalidation handling
* Clean, professional visual behavior
It is built for traders who want actionable zones without visual noise.
How It Works :
[1] Structure break is detected using confirmed swing pivots (non-repaint pivots).
[2] The last opposite candle before the break defines the Order Block.
[3] The zone remains active until invalidated (based on Close or Wick logic).
[4] When price touches the zone:
[ ]* Header appears dynamically.
[ ]* Status changes to “Mitigated”.
[5] When invalidated:
[ ]* Status changes to “Inv”
[ ]* Box is removed after a configurable hold period.
No unnecessary overlays. No zigzag lines. No excessive filtering.
Just structure → block → reaction.
Best Markets / Pairs
This indicator works best on liquid markets where structure is respected:
Forex
EURUSD
GBPUSD
USDJPY
AUDUSD
Metals
XAUUSD (Gold) → especially strong with strict mitigation
XAGUSD
Crypto
BTCUSD
ETHUSD
Indices
US100 / NASDAQ
US500 / S&P
DAX
It performs best in markets with clear impulsive moves followed by retracements.
⏱ Ideal Timeframes
Scalping / Intraday
5m – 15m
Pivot Length: 7–9
Cooldown: 5–8
Intraday / Swing
1H – 4H
Pivot Length: 10–14
Cooldown: 8–12
Higher-Timeframe Bias Usage
Many traders use:
4H OBs for bias
15m/1H for entries
This script works well in that workflow.
⚙ Recommended Default Settings
For most users:
Swing Pivot Length: 10
Break Source: Close
Max Active OBs: 4
OB Range: Wick
Invalidation: Close
Cooldown: 8
Lookback: 120
Hold Invalidated OB: 3 bars
For more conservative traders:
Increase Pivot Length to 14
Keep Invalidation = Close
For aggressive traders:
Use Break Source = Wick
Lower Pivot Length to 7
Who This Is For
Traders who prefer clean structure-based trading
Smart Money / Order Flow traders
Break & Retest traders
Supply & Demand users who want strict zone invalidation
Traders tired of overly complex SMC scripts
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.