OPEN-SOURCE SCRIPT
ORB Pro | Session Breakout Scalper

A precision-filtered Opening Range Breakout strategy built for intraday scalping — with multi-layer confirmation designed to cut false breakouts and size risk intelligently.
This strategy trades breakouts of a configurable opening range, but only when volume, volatility, VWAP trend, and price confirmation all line up — reducing whipsaw entries.
Features
Flexible Opening Range
Multi-Layer Entry Filters (each toggleable independently)
Built-In Risk Management
Smart Position Sizing
Clean, Toggleable Visuals
Realistic Cost Modelling
Notes
This strategy trades breakouts of a configurable opening range, but only when volume, volatility, VWAP trend, and price confirmation all line up — reducing whipsaw entries.
Features
Flexible Opening Range
- Fully configurable range length, session start/end times, and timezone
- Works across regular trading hours and overnight/futures sessions that cross midnight
Multi-Layer Entry Filters (each toggleable independently)
- Range-size filter — only trades when the OR is a healthy size relative to ATR (avoids both dead-quiet and blown-out ranges)
- Volume confirmation — requires breakout volume to exceed a multiple of average volume
- VWAP directional filter — longs only above session VWAP, shorts only below
- False-breakout confirmation — requires price to hold beyond the range for N bars before entering
Built-In Risk Management
- Choice of stop-loss method: range-based or ATR-based
- Configurable risk-reward target with partial profit-taking at a separate R-multiple
- Optional breakeven stop after partial exit
- Daily trade cap to prevent overtrading
- Automatic flatten at session end — no overnight scalp exposure
Smart Position Sizing
- Risk-based sizing (% of equity per trade, scaled to stop distance) or flat % of equity
- Hard position-size cap to prevent excessive leverage on tight stops
Clean, Toggleable Visuals
- Gradient-shaded opening range box (color intensity reflects range size vs. ATR)
- Session VWAP line
- OR high/low levels plotted for the remainder of the session
- Session separators and failed-breakout markers
- One-time OR size label (as an ATR multiple) for quick read on range quality
Realistic Cost Modelling
- Commission and slippage assumptions built into the backtest engine, so results reflect real-world friction rather than frictionless fills
Notes
- Intraday timeframes only. This strategy requires multiple bars within the opening range window to function (e.g. 1–15 min charts). Loading it on Daily+ charts will throw an explicit error rather than silently doing nothing.
- Commission/slippage defaults are generic starting points (0.05% commission, 2 ticks slippage) — tune these to match your actual broker/instrument before trusting backtest P&L numbers.
- All filters can be disabled individually if you want to isolate and test the raw breakout logic, or strip it down to a simpler ORB system.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.