OPEN-SOURCE SCRIPT

Opening Range Breakout ORB - Signals, Targets & Alerts [LunqFX]

698
The Opening Range Breakout (ORB) is one of the most traded intraday strategies — but most ORB indicators only draw the opening range box and leave you guessing. This Opening Range Breakout indicator goes further: it marks the opening range, detects the first genuine breakout, filters fakeouts, projects measured-move targets, and — uniquely — builds a live breakout statistics engine from the last 100 trading days of the symbol on your chart.

What makes this ORB indicator different

Instead of a static box, you get a data-driven read on how your market actually behaves after the opening range:

First-break direction split — how often the day breaks up vs down
Hold rate — how often the first breakout direction holds into the close
Fakeout rate — how often the first breakout fails back inside the range
Target hit rates — how often price reaches 1x and 2x the opening-range height
So before you take the trade you can see, for example, that on this symbol the upside breakout holds into the close 62% of the time and the 1R target is reached on 48% of breakout days.

How the opening range breakout is calculated

Auto mode works on every market with zero setup. The opening range starts at each day's open of the symbol's own exchange — stocks at the 09:30 session open, crypto at the 00:00 UTC daily open, forex and futures at their session open — and lasts a chosen number of minutes (the classic 5-minute, 15-minute or 30-minute ORB). A Custom mode lets you define any session window, such as the London or New York open.
When the opening-range window closes, the range high and low are locked and projected forward as levels.
The first candle close beyond the range (or wick, if you prefer) is treated as the breakout. Targets are projected at 1x and 2x the range height in the breakout direction.
A close back inside the range before the first target is reached is flagged as a fakeout. A breakout that reaches 1R first and only then returns is counted as a valid breakout, not a fakeout.

At the end of each trading day the outcome is recorded — direction, hold, fakeout, targets — and the dashboard percentages are plain rolling hit rates. No repainting, no curve fitting.
How to use it

Breakout day trading: trade the first breakout with more context — use the hold rate to judge whether the break on your symbol is worth taking, and size your target from the 1R / 2R hit rates.

Fakeout fade: when a symbol shows a high fakeout rate, the failed breakout back inside the range is often the better setup; the fakeout is marked in real time.
Range-quality filter: the dashboard shows the opening range as a multiple of ATR, so you can skip abnormally small ranges that tend to break out randomly.
Works on any symbol and any intraday timeframe (1m–15m recommended): index futures and CFDs (NAS100, SPX500, US30, NQ, ES), stocks and ETFs (SPY, QQQ), gold (XAUUSD), Bitcoin and crypto, and forex majors.

Dashboard
istantanea


A clean on-chart panel shows today's live status (building range → inside range → breakout → target hit or fakeout), the opening-range high/low and its size in ATR, and the full statistics block with the sample size always visible.

Settings

Auto anchor (any market, zero setup) or fully custom session window with timezone control — 5 / 15 / 30-minute ORB or any session open
Close-based or wick-based breakout logic
Adjustable target multiples, rolling statistics window, and visuals
Alerts for range locked, breakout up, breakout down, fakeout, target 1 and target 2
Optional gradient momentum candles that can be switched off
No repainting

The opening range is fixed the moment its window closes. Breakouts, fakeouts and targets are confirmed on closed bars only, and the statistics are built exclusively from completed trading days — never recalculated backwards.

This indicator is an educational market-analysis tool, not financial advice. Historical statistics describe past behavior and are not a guarantee of future results. Always confirm with your own analysis and manage your risk.

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.