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
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.