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.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.