OPEN-SOURCE SCRIPT
Opening Range Box

OPENING RANGE BOX + LEVELS (RTH)
OVERVIEW
This indicator draws the Opening Range for the U.S. Regular Trading Hours session starting at 9:30 AM New York time. It plots the Opening Range High, Low, and Midpoint, and can extend those levels for the rest of the session. It also displays the Opening Range size in points and ticks.
WHAT IT DRAWS
• Opening Range box for the first N minutes of RTH (ex: 5, 10, 15)
• OR High (ORH)
• OR Low (ORL)
• OR Midline (midpoint of ORH/ORL)
• Opening Range value label (range in points + ticks)
KEY FEATURES
• Time-anchored drawings (bar_time) so levels stay accurate on any intraday timeframe
• Configurable Opening Range length in minutes
• Configurable box fill/border colors
• Independent styling for OR High / OR Low / Midline (color, width, line style)
• Line extension modes:
BEST FOR
• Futures: ES / NQ / MNQ (and other RTH-based products)
• Intraday stocks and ETFs
• OR breakout, rejection/fade, and mean reversion workflows
NOTES
• Intended for intraday charts
• Opening Range is calculated strictly inside the selected time window (no extra bars)
• Session is America/New_York, 09:30–16:00
OVERVIEW
This indicator draws the Opening Range for the U.S. Regular Trading Hours session starting at 9:30 AM New York time. It plots the Opening Range High, Low, and Midpoint, and can extend those levels for the rest of the session. It also displays the Opening Range size in points and ticks.
WHAT IT DRAWS
• Opening Range box for the first N minutes of RTH (ex: 5, 10, 15)
• OR High (ORH)
• OR Low (ORL)
• OR Midline (midpoint of ORH/ORL)
• Opening Range value label (range in points + ticks)
KEY FEATURES
• Time-anchored drawings (bar_time) so levels stay accurate on any intraday timeframe
• Configurable Opening Range length in minutes
• Configurable box fill/border colors
• Independent styling for OR High / OR Low / Midline (color, width, line style)
• Line extension modes:
- Line extension modes
- To RTH Close
- Right Forever
- For N Minutes
- None - Optional label placement to the LEFT of the Opening Range so it doesn’t block new candles
- Option to keep previous sessions’ Opening Ranges visible for context
BEST FOR
• Futures: ES / NQ / MNQ (and other RTH-based products)
• Intraday stocks and ETFs
• OR breakout, rejection/fade, and mean reversion workflows
NOTES
• Intended for intraday charts
• Opening Range is calculated strictly inside the selected time window (no extra bars)
• Session is America/New_York, 09:30–16:00
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.