PROTECTED SOURCE SCRIPT
Updated Opening Range Suite by SBSniper

Opening Range Suite
An all-in-one opening-range tool suite. It draws the 30-second, 5-minute, and 30-minute opening ranges for the AM session (09:30 NY). Each range is highlighted with a rectangle (high/low with midpoint) and can display a full pack of projection levels.
⸻
What it draws
• AM 09:30 ORs: 30s, 5m, 30m ranges.
• Midpoint line inside each box.
• Projections from the opening range (measured both High→Low and Low→High) at:
−0.5, −1, −1.5, −2, −2.5, −3, −3.5, −4.
• Text labels inside rectangles (fixed text):
AM — “OR 30sec / OR 5min / OR 30min”; PM — “PM 30sec / PM 5min / PM 30min”.
⸻
Smart behavior
• Today always extends to the current bar (so the current session’s box grows with price/time).
• Previous 5 days of each selected range are shown and, by default, extend to 12:00 NY for AM and 16:00 NY for PM (2.5h span).
Toggle available to extend previous 5 out to the current bar instead.
• Projection day cap: You choose how many recent days (including today) draw projection lines. This prevents chart clutter and avoids TradingView object limits.
• Weekend skip: Automatically ignores Saturdays and Sundays based on New York time.
• Single label toggle: Turn all labels on/off; styling and text are fixed for clarity and consistency.
⸻
How ranges are calculated
• The script anchors to New York local time and detects:
• AM session: 09:30 → grabs the 30s/5m/30m bar(s) that open at 09:30:00 NY.
• Each range uses the bar’s high/low, draws a rectangle spanning the selected time window, and plots the midpoint.
⸻
Notes & best practices
• The 30-second OR requires a symbol/data plan that provides 30-second bars. If your feed doesn’t have 30s, keep the 30s toggles off and use 5m/30m.
• Use on intraday charts. The tool relies on bar times to align with NY session opens.
• For non-US symbols or 24/7 markets, NY anchoring still works; just be aware that “open” is tied to 09:30 New York time.
An all-in-one opening-range tool suite. It draws the 30-second, 5-minute, and 30-minute opening ranges for the AM session (09:30 NY). Each range is highlighted with a rectangle (high/low with midpoint) and can display a full pack of projection levels.
⸻
What it draws
• AM 09:30 ORs: 30s, 5m, 30m ranges.
• Midpoint line inside each box.
• Projections from the opening range (measured both High→Low and Low→High) at:
−0.5, −1, −1.5, −2, −2.5, −3, −3.5, −4.
• Text labels inside rectangles (fixed text):
AM — “OR 30sec / OR 5min / OR 30min”; PM — “PM 30sec / PM 5min / PM 30min”.
⸻
Smart behavior
• Today always extends to the current bar (so the current session’s box grows with price/time).
• Previous 5 days of each selected range are shown and, by default, extend to 12:00 NY for AM and 16:00 NY for PM (2.5h span).
Toggle available to extend previous 5 out to the current bar instead.
• Projection day cap: You choose how many recent days (including today) draw projection lines. This prevents chart clutter and avoids TradingView object limits.
• Weekend skip: Automatically ignores Saturdays and Sundays based on New York time.
• Single label toggle: Turn all labels on/off; styling and text are fixed for clarity and consistency.
⸻
How ranges are calculated
• The script anchors to New York local time and detects:
• AM session: 09:30 → grabs the 30s/5m/30m bar(s) that open at 09:30:00 NY.
• Each range uses the bar’s high/low, draws a rectangle spanning the selected time window, and plots the midpoint.
⸻
Notes & best practices
• The 30-second OR requires a symbol/data plan that provides 30-second bars. If your feed doesn’t have 30s, keep the 30s toggles off and use 5m/30m.
• Use on intraday charts. The tool relies on bar times to align with NY session opens.
• For non-US symbols or 24/7 markets, NY anchoring still works; just be aware that “open” is tied to 09:30 New York time.
Release Notes
Bug fixes 1.0* removed repeating OR overlay per bar movement for current & historic data
* removed repeating projections overlay per bar movement for current & historic data
Release Notes
Latest bug fixes & improvementsNo more overlapping rectangles for today
Today’s 30s/5m/30m boxes and midpoint lines now use persistent handles and are updated (right edge moved) instead of recreated each bar.
Projection lines & labels no longer stack
Today’s projection lines/labels are cleared and rebuilt each update; historical drawings are deleted safely before redrawing.
Implemented guard-ed cleanup using size-checked while loops to avoid array out-of-bounds or pop() on empty arrays.
Historical (prev-5) overlap removed
All historical boxes, midlines, and projection objects are tracked in arrays and fully cleared before the new set is drawn—so extend-to-now works without duplicates.
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
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.
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
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.