OPEN-SOURCE SCRIPT
[CT] ORB Suite

This indicator is an Opening Range first tool that also includes an Initial Balance framework, breakout detection, and a full target and alerting package. It is designed to define a clean Opening Range at the start of the regular trading session and then turn that range into an actionable breakout structure by plotting the key levels, projecting measured targets, and visually confirming the exact breakout candle on your chart. The Opening Range component can be configured as either the first bar of the session or a true time-based duration, such as 1, 2, 5, 10, 15, 30 minutes, or 1 hour, which lets you standardize the opening structure across different chart timeframes without needing to “count bars.” As price prints during the Opening Range window, the script continuously updates the OR high and OR low, then locks those levels once the window closes so you have a stable reference for the rest of the session. The OR area can be shaded for quick visual recognition, and an optional OR midpoint line and label can be displayed to help you judge whether price is accepting above the middle of the range or failing back through it.
Once the Opening Range is formed, the script upgrades the workflow by adding breakout qualification rules that you can control. You can choose confirmation based on a body cross, a close cross, or a close above or below the range boundary, which is a meaningful improvement over simple “touch” logic because it helps reduce false signals and makes the breakout trigger more consistent with how you actually trade. When a breakout is confirmed, the indicator can highlight the breakout candle itself so there is no ambiguity about which bar triggered the signal. You can highlight the candle body, the chart background, or both, and you can select separate colors for long and short breakouts. This makes chart review and live decision-making cleaner because you can immediately see where the breakout truly occurred instead of guessing between several candles that probed the level.
The next major upgrade is the breakout target system. After a long breakout, targets are calculated as true multiples of the Opening Range size, starting from the OR high and projecting upward by the selected multiples. After a short breakout, targets are calculated from the OR low and projected downward by the same multiple logic. By default, the script supports four take-profit targets, TP1 through TP4, with sensible preset multiples that step outward in a structured way, but you can customize each multiple to match your instrument and style. This target system is a practical enhancement because it provides objective, range-based profit-taking levels that align with common intraday expansion behavior rather than arbitrary fixed tick offsets. You also get full control over whether the target lines and labels appear only after a breakout triggers, which keeps the chart clean and prevents “pre-biasing,” or whether you want to see projected targets in both directions before the breakout occurs for planning and scenario mapping. In addition, the target hit detection is configurable so you can decide whether a target is considered “hit” by a simple high or low touch or only after a close crosses the target, which is important for traders who want stricter confirmation and cleaner backtesting logic.
Beyond the OR and targets, the indicator includes a complete Initial Balance module as an additional layer of structure. The IB duration is selectable and independent, and the script can plot IB high, IB low, and an optional IB midpoint, with optional fill shading to make the balance area obvious. A key upgrade here is the ability to base the breakout targets on either the Opening Range or the Initial Balance. This means you can run a pure OR breakout playbook, a pure IB breakout playbook, or compare both structures on the same session without changing indicators. This flexibility matters because OR breakouts tend to be more sensitive and earlier, while IB-based levels often better reflect the session’s early balance and can produce more stable expansion targets.
Another major improvement is the history and session management. The script can freeze all drawings at the end of the session so lines and fills do not incorrectly extend into the next day, and it can optionally keep a configurable amount of history, such as the last 20 sessions, so you can study how price reacts to prior OR and IB structures. You also have control over whether IB should be included in that stored history, which helps if you want a cleaner chart while still retaining the OR context. To support different chart themes and personal preferences, label styling is expanded with controls for label background colors, text colors, transparency, and horizontal offsets, so the levels remain readable without covering price action.
Finally, the alerting system is upgraded into a full set of actionable events. The indicator can generate alerts for session open and session close, for the moment the Initial Balance forms, for the moment the Opening Range forms, for long and short breakouts, and for each target hit from TP1 through TP4. Alerts can be used in standard alertcondition form or as dynamic alert() calls that include price-filled messages, which is a practical enhancement for traders who want their phone or desktop notifications to contain the exact level values rather than generic labels.
This script is a derivative work built on the original Initial Balance foundation authored by © czoa under the Mozilla Public License 2.0, with extensive additions and improvements by © ChaosTrader63 to expand it into a complete Opening Range and Initial Balance breakout suite. The core upgrades are the configurable time-based Opening Range, breakout candle highlighting, multi-target measured range projections through TP4 with optional pre-projection behavior, stricter breakout confirmation modes, target hit rules, richer history controls, stronger label customization, and a comprehensive alert system that turns the session structure into a usable trade planning and execution framework directly on TradingView.
Once the Opening Range is formed, the script upgrades the workflow by adding breakout qualification rules that you can control. You can choose confirmation based on a body cross, a close cross, or a close above or below the range boundary, which is a meaningful improvement over simple “touch” logic because it helps reduce false signals and makes the breakout trigger more consistent with how you actually trade. When a breakout is confirmed, the indicator can highlight the breakout candle itself so there is no ambiguity about which bar triggered the signal. You can highlight the candle body, the chart background, or both, and you can select separate colors for long and short breakouts. This makes chart review and live decision-making cleaner because you can immediately see where the breakout truly occurred instead of guessing between several candles that probed the level.
The next major upgrade is the breakout target system. After a long breakout, targets are calculated as true multiples of the Opening Range size, starting from the OR high and projecting upward by the selected multiples. After a short breakout, targets are calculated from the OR low and projected downward by the same multiple logic. By default, the script supports four take-profit targets, TP1 through TP4, with sensible preset multiples that step outward in a structured way, but you can customize each multiple to match your instrument and style. This target system is a practical enhancement because it provides objective, range-based profit-taking levels that align with common intraday expansion behavior rather than arbitrary fixed tick offsets. You also get full control over whether the target lines and labels appear only after a breakout triggers, which keeps the chart clean and prevents “pre-biasing,” or whether you want to see projected targets in both directions before the breakout occurs for planning and scenario mapping. In addition, the target hit detection is configurable so you can decide whether a target is considered “hit” by a simple high or low touch or only after a close crosses the target, which is important for traders who want stricter confirmation and cleaner backtesting logic.
Beyond the OR and targets, the indicator includes a complete Initial Balance module as an additional layer of structure. The IB duration is selectable and independent, and the script can plot IB high, IB low, and an optional IB midpoint, with optional fill shading to make the balance area obvious. A key upgrade here is the ability to base the breakout targets on either the Opening Range or the Initial Balance. This means you can run a pure OR breakout playbook, a pure IB breakout playbook, or compare both structures on the same session without changing indicators. This flexibility matters because OR breakouts tend to be more sensitive and earlier, while IB-based levels often better reflect the session’s early balance and can produce more stable expansion targets.
Another major improvement is the history and session management. The script can freeze all drawings at the end of the session so lines and fills do not incorrectly extend into the next day, and it can optionally keep a configurable amount of history, such as the last 20 sessions, so you can study how price reacts to prior OR and IB structures. You also have control over whether IB should be included in that stored history, which helps if you want a cleaner chart while still retaining the OR context. To support different chart themes and personal preferences, label styling is expanded with controls for label background colors, text colors, transparency, and horizontal offsets, so the levels remain readable without covering price action.
Finally, the alerting system is upgraded into a full set of actionable events. The indicator can generate alerts for session open and session close, for the moment the Initial Balance forms, for the moment the Opening Range forms, for long and short breakouts, and for each target hit from TP1 through TP4. Alerts can be used in standard alertcondition form or as dynamic alert() calls that include price-filled messages, which is a practical enhancement for traders who want their phone or desktop notifications to contain the exact level values rather than generic labels.
This script is a derivative work built on the original Initial Balance foundation authored by © czoa under the Mozilla Public License 2.0, with extensive additions and improvements by © ChaosTrader63 to expand it into a complete Opening Range and Initial Balance breakout suite. The core upgrades are the configurable time-based Opening Range, breakout candle highlighting, multi-target measured range projections through TP4 with optional pre-projection behavior, stricter breakout confirmation modes, target hit rules, richer history controls, stronger label customization, and a comprehensive alert system that turns the session structure into a usable trade planning and execution framework directly on TradingView.
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.