OPEN-SOURCE SCRIPT
מעודכן ORB Breakout Targets | AlphaScript

ORB Breakout Targets combines a session opening range with the key levels traders already watch, then answers the question most breakout tools leave open: broken — toward what? When the range breaks, the nearest significant level beyond the break is automatically identified and highlighted as the measured target. A breakout with a destination, not just an arrow.
🧠 Concept
The opening range of a session concentrates the first auction of the day; its break signals initiative in one direction. But a break alone says nothing about follow-through — price tends to travel between reference levels, and the natural magnet after a breakout is the nearest untested level in the breakout direction: the prior day's high, an overnight session extreme, the Monday range. Finding that level by eye, every session, across a dozen candidates, is exactly the work this tool removes. The range gives you the trigger; the key level map gives you the objective.
🔍 What it does
Builds the opening range from the first N minutes (default 30) of your chosen session — New York, London, or Asia — and draws it as a live box whose fill reflects the current state: bullish coloring while price holds above the range midpoint, bearish below it, updating in real time so the box itself reads as a bias gauge at a glance. On a confirmed breakout, marks the break on the chart and highlights the nearest enabled key level beyond the range as the target, in its own color with a dedicated label.
Key levels available as target candidates and chart structure:
Timeframes — 4H, Daily, Weekly, Monthly, Quarterly, Yearly: open, high, low, mid, and the prior period's high, low, and mid
Sessions — Asia, London, New York (windows configurable, in New York time): open, high, low, mid, and prior session levels
Monday Range — high, low, and mid of the week's opening day
Levels sharing the same price within your Merge Threshold collapse into one line with a combined label, so the target reads as a single clean zone even when multiple references agree on it.
⚙️ How it works
A breakout is confirmed only on a full bar close beyond the range — wicks through the boundary don't count, and nothing repaints intrabar. Detection runs only during the parent session of your selected opening range, so overnight drift through yesterday's levels never produces a false signal.
On a bullish break, the target is the first enabled level above the range high; on a bearish break, the first enabled level below the range low.
Levels sitting inside the range are never selected. The target is dynamic: enable or disable level groups and it recalculates to the nearest qualifying level — your level settings are your target settings.
All higher-timeframe and session values are retrieved with non-repainting historical requests. What a historical bar shows is what you would have seen live.
📈 How to use it
The default view is built for intraday breakout trading: previous day high/low, Asia and London session extremes, and the Monday range as target candidates, with the New York 30-minute opening range.
Fewer enabled levels means more meaningful targets — add Weekly or Monthly levels only if you want swing-distance objectives, and expect targets to sit farther away when you do.
The box color gives a quick bias read before and after the break: sustained bullish fill with price pressing the range high often precedes the upside break, and a break that flips the box back against you is an early warning the move is failing.
Three alerts are included: bullish breakout, bearish breakout, and target reached — each fires once per session, per direction. Recommended alert setting: "Once per bar close." TradingView shows a standard notice on alerts from close-confirmed scripts; that is expected behavior and the tradeoff for signals that don't repaint.
Session times, range duration (1–120 minutes), colors, line styles, and every level group are independently configurable.
📝 Notes
A decision-support tool, not a strategy. The target marks where the nearest significant reference sits beyond the break — where price has reacted before, not where it must go. Breakouts fail; targets are objectives, not guarantees. Always apply your own risk management.
🧠 Concept
The opening range of a session concentrates the first auction of the day; its break signals initiative in one direction. But a break alone says nothing about follow-through — price tends to travel between reference levels, and the natural magnet after a breakout is the nearest untested level in the breakout direction: the prior day's high, an overnight session extreme, the Monday range. Finding that level by eye, every session, across a dozen candidates, is exactly the work this tool removes. The range gives you the trigger; the key level map gives you the objective.
🔍 What it does
Builds the opening range from the first N minutes (default 30) of your chosen session — New York, London, or Asia — and draws it as a live box whose fill reflects the current state: bullish coloring while price holds above the range midpoint, bearish below it, updating in real time so the box itself reads as a bias gauge at a glance. On a confirmed breakout, marks the break on the chart and highlights the nearest enabled key level beyond the range as the target, in its own color with a dedicated label.
Key levels available as target candidates and chart structure:
Timeframes — 4H, Daily, Weekly, Monthly, Quarterly, Yearly: open, high, low, mid, and the prior period's high, low, and mid
Sessions — Asia, London, New York (windows configurable, in New York time): open, high, low, mid, and prior session levels
Monday Range — high, low, and mid of the week's opening day
Levels sharing the same price within your Merge Threshold collapse into one line with a combined label, so the target reads as a single clean zone even when multiple references agree on it.
⚙️ How it works
A breakout is confirmed only on a full bar close beyond the range — wicks through the boundary don't count, and nothing repaints intrabar. Detection runs only during the parent session of your selected opening range, so overnight drift through yesterday's levels never produces a false signal.
On a bullish break, the target is the first enabled level above the range high; on a bearish break, the first enabled level below the range low.
Levels sitting inside the range are never selected. The target is dynamic: enable or disable level groups and it recalculates to the nearest qualifying level — your level settings are your target settings.
All higher-timeframe and session values are retrieved with non-repainting historical requests. What a historical bar shows is what you would have seen live.
📈 How to use it
The default view is built for intraday breakout trading: previous day high/low, Asia and London session extremes, and the Monday range as target candidates, with the New York 30-minute opening range.
Fewer enabled levels means more meaningful targets — add Weekly or Monthly levels only if you want swing-distance objectives, and expect targets to sit farther away when you do.
The box color gives a quick bias read before and after the break: sustained bullish fill with price pressing the range high often precedes the upside break, and a break that flips the box back against you is an early warning the move is failing.
Three alerts are included: bullish breakout, bearish breakout, and target reached — each fires once per session, per direction. Recommended alert setting: "Once per bar close." TradingView shows a standard notice on alerts from close-confirmed scripts; that is expected behavior and the tradeoff for signals that don't repaint.
Session times, range duration (1–120 minutes), colors, line styles, and every level group are independently configurable.
📝 Notes
A decision-support tool, not a strategy. The target marks where the nearest significant reference sits beyond the break — where price has reacted before, not where it must go. Breakouts fail; targets are objectives, not guarantees. Always apply your own risk management.
הערות שחרור
v1.1 — bug fixes & smarter targets-Fixed a runtime error when using the London or Asia opening range (session time calculation failed on non-whole-hour range durations).
-Asia opening range now anchors to the 18:00 ET Globex open, so it works correctly on CME futures.
-Breakout detection is now confined to the selected session — no more false breakout signals from overnight drift through the prior range.
-Added alerts: bullish breakout, bearish breakout, and target reached.
-Breakout targets now only use completed key levels. A still-forming session high or low (e.g. the current Asia session while an Asia range is active) is never chosen as a target, because a target that moves with price isn't a target. Once a session closes, its high/low becomes a valid target again.
-The target is the nearest enabled level beyond the broken range — your level map is the target map.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
Gabriel R. | AlphaScript
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
Gabriel R. | AlphaScript
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.