OPEN-SOURCE SCRIPT

Strong NQ ORB Breakouts | ProjectSyndicate

5 186
STRONG NQ ORB Breakouts catches the moment the Nasdaq session resolves its opening range — and instead of treating every push past a line as a trade, it waits for a genuine close beyond the range, tags the direction, and ranks the breakout 0–10 with a star score. The first block of the session builds a range; price then has to actually close outside it, in agreement with momentum and — if you want it — the higher-timeframe trend, before a signal arms. Every setup gets a structural stop, fixed R-based targets with a ⅓/⅓/⅓ scale-out and break-even after the first bank, and is tracked live on a full statistics dashboard — including end-of-session time-stops — so you can see exactly how the logic behaves on the instrument and timeframe you trade.

🧠 Opening-Range Core — the core idea. At the start of the session the engine records the high and low of a configurable opening window, 60 minutes by default. That band is the opening range: the session's first agreed value area. A signal fires on the release — the bar that closes beyond the range high for a long or the range low for a short inside the trade window — and the direction is set by that break. In Auto mode the range anchors to the instrument's own daily session open (the first bar of the day), so it locks to the real NAS100 / NQ open regardless of your feed's server clock; a Custom session-plus-timezone mode is there if you'd rather define the window by hand. Signals are evaluated on the bar's close and are fixed once that bar closes — the range and the break do not repaint.

📈 Range Mapping & ADR Context — while the opening window is live, the engine continuously tracks the developing high, low, and width of the range, then freezes it the moment the window ends. The finished range is measured in points and expressed as a percentage of the instrument's Average Daily Range, a non-repainting daily read, so you instantly see whether the session is coiling tightly or has already burned its move. A clean, proportionate range is a loaded session; an over-wide one is a day that has already spent itself.

🎯 Structural Stop + R-Based Scale-Out — risk (R) is measured from an ATR distance by default — the strongest basis on NAS100 M5 — or against the opposite range edge or the range midline if you prefer, then floored and capped by ATR so it can never collapse into a meaningless stop or balloon into a wide one. TP1, TP2, and TP3 are set at clean R multiples and default to a balanced 1R / 2R / 3R, fully adjustable. The trade model is an honest ⅓ scale-out: one third banks at each target, and after TP1 the remaining two thirds ride with the stop moved to break-even. Every signal plots its complete Entry / SL / TP1 / TP2 / TP3 line set, labeled levels, and filled TP / SL zone boxes, with an R-tagged result label on exit.

🎚️ Conviction Controls — a small set of dials sets how serious a breakout must be before it counts: the 0–10 Minimum Strength gate, an optional Range-vs-ADR window that skips days whose range is too tight or too wide, a Close-vs-Wick breakout trigger, and Max One Trade Per Day. By design the day-skipping filters are off by default — no days are hidden — so you first see the raw, unfiltered behavior. Tighten them for fewer, higher-quality fires; loosen them for more activity. This is your main dial for conviction versus frequency.

🧭 HTF Trend Alignment + Session Gating — an optional higher-timeframe EMA filter blocks counter-trend fires, keeping you on the dominant side: longs only above it, shorts only below. The higher-timeframe value is read without lookahead. Entries are confined to the trade window after the range forms, and the per-day cap spaces out tickets so one volatile session can't stack trades. Anything still open at the session close is flattened by an end-of-session time-stop — and that exit is booked and counted honestly, never quietly dropped.

🧲 Liquidity Magnet — the engine maps resting liquidity by tracking confirmed swing pivots above and below price and marking each as swept or unswept as price trades through it. When a breakout fires, it projects the nearest opposing unswept pool as a dotted magnet line — the pocket of liquidity the move is naturally drawn toward — and the dashboard reports the distance to the nearest pools up and down in ATR terms. It's context for where the breakout wants to go.

⭐ 0–10 Setup-Quality Score — every release is scored and labeled with 1–5 stars and a tier FORMING → WEAK → MODERATE → STRONG → VERY STRONG → ELITE across breakout-native factors: expansion-candle body strength, candle range vs ATR, momentum alignment over short and medium lookbacks, volume confirmation, clean penetration beyond the range edge, RSI agreement, higher-timeframe EMA alignment, and intraday bias of close versus the session open. A companion direction-probability read blends penetration, momentum, RSI, session bias, and HTF position into an up/down percentage. Treat the score as a confluence / cleanliness read for ranking setups — it describes how textbook a breakout is, not a guaranteed outcome. Note: on the test data, filtering to "strong only" actually *reduced* win rate, so the stars default to a context tool rather than a hard gate.

📊 Live Statistics Dashboard — a non-intrusive panel tracks, in real time on your chart: the current session state of waiting / forming OR / range set / armed / trade active, the live opening-range size and its ADR percentage, the magnet distance up and down, the active bias and trade, the live strength and direction-probability meters, total win rate and closed-trade count, profit factor, average R per trade, total R, best-performing direction, long vs short win rate, current and max win/loss streaks, and a TP1 / TP2 / TP3 / SL / EOD outcome breakdown. Every filled trade that reaches an outcome is counted — winners, stop-outs, break-even runners, and time-stops alike — so the numbers are computed live from the real signals on your current symbol and timeframe rather than a figure printed in a description.

🎨 Clean Themed Visuals — a Midnight institutional palette, with Emerald, Ice Blue, Gold Black, and Aqua Violet alternates, shades the opening-range box, the ORH / ORL / midline levels, the per-trade SL / TP ladder, the liquidity pools and magnet, and the dashboard to one coherent look, so quality and direction read at a glance. The range box is drawn over the window where it formed and projected forward with point-labeled edges; long and short trades are color-keyed; a faint tint marks the active opening window. A shelf-length and max-drawn-trades control keep the chart clean — the right-edge zones never stretch into oversized towers, tickets snap back to the exit bar on close so labels never float away, and only the most recent N tickets stay drawn while the statistics remain cumulative over the whole history.

🔔 Detailed Alerts — fires on long / short opening-range breakouts, plus TP3, protected partial-TP, and stop-loss events, formatted for manual or automated use.

🔧 Fully Customizable — every component is exposed: the range anchor (Auto session-open or Custom), the opening-range minutes, timezone, and trade window; the ATR length, stop basis of ATR / opposite edge / midline with risk cap and floor; the three R targets, break-even-after-TP1 toggle, Close-vs-Wick trigger, and one-trade-per-day cap; the ADR gate with min/max band, minimum strength, and HTF alignment filter and timeframe; the liquidity pivot length, pool display, and magnet toggle; the point definition for the dashboard; all five themes; and every label, dashboard, zone, and projection toggle.

🎯 Why this is different — most ORB tools just draw two lines at a fixed clock time and leave everything after that to you. This one anchors the range to the real Nasdaq open, sizes the break against the instrument's own ADR so a tight coil and a blown-out day aren't treated alike, can demand momentum, volume, penetration, and trend confirmation before it fires, anchors risk sensibly, then layers a genuine ⅓/⅓/⅓ scale-out with break-even, a liquidity magnet, an objective 0–10 ranking, and a live, honest statistics panel — one that counts stop-outs and end-of-session exits in full — so you are tuning and judging the system on real, current data instead of a marketing figure.

🚀 Where to use it — built and validated for NAS100 / NQ on the M5 timeframe, where the default OR 60m · ATR×1.0 stop · 1R/2R/3R model was developed. The ATR-based stop and ADR sizing adapt to volatility automatically, and the session windows can be re-pointed to a different open if you want to run the same engine elsewhere. It works on other index CFDs and futures, but the defaults are tuned for the Nasdaq open.

🎯 How to trade it

- Apply it to NAS100 / NQ on M5 and let the dashboard populate. Read the live win rate, profit factor, and average R for your symbol and timeframe before committing — if the logic doesn't suit your feed, you'll see it.
- Start with the day-skipping filters off to see raw behavior; add the HTF Trend Alignment and Range-vs-ADR gates when you want to trade only with the larger trend and skip dead or already-spent sessions.
- Wait for a NQ ORB LONG / NQ ORB SHORT label — it marks a confirmed close beyond the opening range, with the star score, direction probability, and Entry, SL, and TP1/2/3 already plotted.
- Manage the trade with the plotted levels: the structural SL defines your risk, one third banks at each R target with the stop moving to break-even after TP1, and any position still open at the trade-window close is flattened by the time-stop.
- Use Minimum Strength and Max One Trade Per Day to set your tempo, and read the liquidity magnet for a sense of where the move is being drawn.

⚠️ Important — this is a decision-support tool, not a standalone buy/sell system, and it makes no performance guarantees. Default settings were chosen on historical data and behavior will vary by instrument, timeframe, session, and configuration; the dashboard's statistics are historical and descriptive, not a forecast. The trade model includes a ⅓ scale-out, break-even after TP1, and an end-of-session time-stop, so some trades close at a fraction of a target rather than a full win or loss — these are counted in full, which is honest but means win rate alone is misleading; always weigh it together with average R and profit factor, and resize the R targets to your own risk profile. Signals confirm on the closed bar, so always wait for the labeled release on a closed candle. Always combine it with your own analysis and risk management, and test it on your market before trading it live.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.