Pine Script Strategy
Opening Range Breakout Pine Script for Prop Firm Evaluations
The Opening Range Breakout is one of the cleanest, most prop-firm-compatible setups available for ES, NQ, MES, and MNQ. A fixed range, a defined stop, and a natural cap of one or two entries per session — here's the Pine Script built around it.
What the opening range breakout is — and why it fits prop firm evals
The Opening Range Breakout (ORB) marks the high and low printed during the first 30 minutes of the Regular Trading Hours session — 9:30 to 10:00 AM ET for equity index futures like ES and NQ. That window captures the first wave of institutional order flow and the market's initial read on the day's news. The high and low of that window become the range.
Once the range locks at 10:00 AM, the script switches to breakout mode: a bar closing above the range high triggers a long, a bar closing below the range low triggers a short. Entries confirm on bar close only — never on a wick touch or an intrabar sweep — which removes the most common source of repainting in breakout logic.
The math tends to work in a trader's favor. A 30-minute range on ES typically spans several points depending on the day's volatility, and a breakout that continues has a natural target of one full range width or more — enough for a 2:1 reward-to-risk profile on most sessions.
Just as important, ORB is inherently low-frequency. The range forms once, the breakout fires once or twice, and the session is done. There's no algorithm grinding through a dozen entries and chewing through a daily limit — exactly the kind of disciplined signal count risk desks like to see from an automated account.
Why ORB is naturally prop-firm compatible
Defined Session Start
The range only forms during the first 30 minutes of RTH — no overnight entries, no pre-market noise.
Clear Stop Levels
The stop sits at the opposite side of the range or a fixed ATR multiple from entry — never ambiguous, always known before the trade fires.
Limited Trades Per Day
At most one long and one short signal per session. Overtrading — the top cause of eval failure — becomes structurally difficult.
Daily Kill Switch Ready
Because entries cluster right at the open, a kill switch is trivial to reason about: if the first trade stops out, the script is done for the day.
How the Pine Script implements the ORB
The script tracks the running high and low of every bar from 9:30 AM ET, and locks the range the moment the 10:00 AM bar closes. Those levels are stored and plotted so you can see exactly what the script is watching. After the lock, each new bar's close is checked against the range — a long fires when price closes beyond the high by a small ATR buffer (a false-breakout filter that screens out marginal ticks that immediately reverse), and a short fires on the mirror condition below the low.
The stop sits at the midpoint of the range on smaller accounts and the full opposite side on larger ones, giving the trade room to breathe while keeping the worst case comfortably inside a firm's daily limit. A fixed-dollar override is also available for traders who prefer absolute risk over a range-relative stop.
Here's a simplified version of the range-lock and breakout condition:
//@version=5
strategy("Opening Range Breakout — Illustration", overlay=true)
sessStart = timestamp("America/New_York", year, month, dayofmonth, 9, 30)
sessLock = timestamp("America/New_York", year, month, dayofmonth, 10, 0)
inWindow = time >= sessStart and time < sessLock
var float rangeHigh = na
var float rangeLow = na
var bool rangeSet = false
if inWindow
rangeHigh := na(rangeHigh) ? high : math.max(rangeHigh, high)
rangeLow := na(rangeLow) ? low : math.min(rangeLow, low)
rangeSet := false
else if not rangeSet and not na(rangeHigh)
rangeSet := true
buffer = ta.atr(14) * 0.15
longOK = rangeSet and close > rangeHigh + buffer
shortOK = rangeSet and close < rangeLow - buffer
if longOK
strategy.entry("ORB Long", strategy.long)
if shortOK
strategy.entry("ORB Short", strategy.short) The RTH filter stops new entries after 3:30 PM ET and flattens any open position by 3:45 PM to avoid carrying into the close, while the kill switch halts entries once cumulative P&L drops below a configurable threshold — typically 80% of the firm's daily loss limit.
Best timeframes for ORB
5-minute chart: the standard choice for most ORB traders. Six bars form the range, giving a well-defined high and low, and signals tend to arrive within the first hour after the lock. The tradeoff is more noise, which is exactly what the ATR buffer exists to filter.
15-minute chart: better suited to traders who prefer fewer, larger signals. Only two bars form the range, so the levels come from less data — but genuine breakouts tend to extend further because the chart filters out more micro-structure chop. This timeframe pairs particularly well with MNQ and MES, where the natural dollar range is smaller.
Best firms and account sizes for ORB
| Firm | Account Size | Why It Fits | Recommended Contract |
|---|---|---|---|
| Apex Trader Funding | 50k | Intraday trailing threshold means a winning ORB run doesn't drag the floor against you, and the single-session structure suits the eval's fast-pass design. | MES (1–2 contracts) |
| Topstep | 50k | EOD trailing drawdown lets the intraday swing before a breakout resolves without touching the trail, and the daily loss limit still leaves plenty of room for a one- or two-trade day. | MES (1–2 contracts) |
| MyFundedFutures | 50k | Static drawdown never moves, so a single ORB win doesn't compress the cushion — comfortable with a low-frequency strategy like this one. | MES or MNQ |
| Tradeify (Growth path) | 50k | No hard daily loss limit on the Growth eval (a soft pause only) and eod trailing drawdown mean ORB's one-trade-a-day structure rarely brushes against either guardrail. | MES (1–2 contracts) |
ORB vs other strategies — when it works and when it doesn't
ORB is a trending-day strategy. It performs best when the open sets a directional bias that holds for the rest of the session — strong data releases, afternoon FOMC announcements, and sector-driven moves all tend to produce clean breakouts.
On range-bound days, when price chops back through the opening range repeatedly, ORB struggles: a breakout fires, moves a few points, then reverses and stops out. That's not a flaw in the logic — it's the nature of that day's structure — and the ATR buffer reduces but doesn't eliminate these false starts.
Compared with a trend-following script like SuperTrend, ORB produces fewer signals a week but larger average wins on the days it connects. Compared with a mean-reversion script like the VWAP strategy, ORB has a lower win rate but a meaningfully better reward-to-risk. Pairing ORB with VWAP fade — one trend setup, one counter-trend setup — is a common combination among multi-strategy traders.
Performance characteristics
Backtest figures for this configuration will replace the placeholders above once a verified TradingView Strategy Tester run is complete.
Backtested results, once published, reflect historical conditions only and are not a guarantee of future performance. Evaluation outcomes depend on execution quality, slippage, and the specific rules your firm has in place at the time you trade.