OPEN-SOURCE SCRIPT
RTH Gap [TakingProphets]

OVERVIEW
RTH Gap [TakingProphets] marks the Opening Range Gap: the gap between the prior regular-session close and the next regular-session open.
It measures from the prior RTH close at 4:14 PM New York time to the next RTH open at 9:30 AM New York time, draws that range as a box, and overlays quadrant levels at 0, 25, 50, 75, and 100 percent.
This indicator does not provide trading signals, entries, or forecasts. It is a visualization aid for studying the Opening Range Gap within an ICT-style analytical framework.
The Opening Range Gap (ORG) is the space between where the regular session closed and where it reopened the next day. Within ICT-style education, this gap and its internal quadrants, especially the 50 percent midpoint, are studied for how price reacts when it trades back into them. This tool marks the gap and its quadrants automatically so they can be reviewed objectively rather than drawn by hand.
PURPOSE AND SCOPE
-----------------------------------------------------------------------------------------------
The tool serves as a research and study aid to document and analyze the Opening Range Gap and its internal levels.
It is commonly used to:
Automate the marking of the daily RTH gap and its quadrants.
Study how price reacts at the 50 percent midpoint and the other quadrant levels.
Keep several prior gaps on the chart for multi-day review.
Journal how often a gap is filled, respected, or rejected.
Teach the Opening Range Gap concept in a mentorship or training context.
LOGIC STRUCTURE
-----------------------------------------------------------------------------------------------
RTH Gap detects the gap on the 1-minute series and displays it consistently on any chart timeframe.
Detection
The prior RTH close is captured at 4:14 PM New York time.
The next RTH open is captured at 9:30 AM New York time.
The gap between those two prices becomes the range for that session.
Detection runs on the 1-minute series and its values are latched, so the gap displays correctly whether the chart is on a low or high timeframe.
Quadrants
The gap is drawn as a box, with horizontal levels at 0, 25, 50, 75, and 100 percent of the range.
Each level can be toggled, colored, and styled independently, and optionally labeled with its percentage and formation date.
Selection and Retention
The number of gaps shown is user controlled.
Gaps can be selected either by how recently they formed or by proximity of their midpoint to current price.
An IPDA lookback setting controls how far back gaps are retained before being pruned.
COMPONENTS AND VISUALS
-----------------------------------------------------------------------------------------------
Gap Box — The range between the prior RTH close and the next RTH open.
Quadrant Levels — Horizontal lines at 0, 25, 50, 75, and 100 percent of the gap.
Quadrant Labels — Optional labels showing each level's percentage and, if enabled, the gap's formation date.
INPUT CATEGORIES
-----------------------------------------------------------------------------------------------
General — Enable toggle, IPDA lookback length, date-prefix and quadrant-label toggles, and the selection mode (Most recent or Proximity).
Opening Range Gaps — Master visibility and how many gaps to display.
Opening Range Gap Style — Box color, fill and border options, gradient toggle, label color and size, and independent visibility, color, style, and width for each of the five quadrant levels.
USAGE GUIDELINES
-----------------------------------------------------------------------------------------------
RTH Gap is suited for the review and documentation of Opening Range Gap behavior.
Recommended educational workflows:
Mark the daily RTH gap and review how price interacts with its 50 percent midpoint.
Keep two or three prior gaps on the chart to study multi-day reactions.
Compare gaps that fill quickly against those that hold as support or resistance.
Switch between Most recent and Proximity modes depending on the study.
Teach the Opening Range Gap concept in mentorship or training sessions.
The tool is oriented toward regular-session index futures, where the RTH gap is most applicable.
OPERATIONAL NOTES AND LIMITATIONS
-----------------------------------------------------------------------------------------------
Detection is based on the 4:14 PM and 9:30 AM New York session times and is oriented toward regular-session instruments.
Gap values are latched from the 1-minute series so they display on any chart timeframe.
The selection mode and display count control which gaps appear, not how many are detected.
The IPDA lookback setting controls how far back gaps are retained.
The box, quadrant lines, and labels are visual study aids only.
This tool does not include setups, entries, targets, or alerts.
ORIGINALITY AND ATTRIBUTION
-----------------------------------------------------------------------------------------------
The detection and rendering engine is written from scratch in Pine v6, using a latched 1-minute session-time detector so the gap displays on any timeframe, a quadrant gradient system with per-level styling, two selection modes, and a lookback-based retention system.
Core concepts such as the Opening Range Gap and its quadrant levels are publicly taught within ICT-style market education. This implementation was designed and engineered by TakingProphets.
TERMS AND DISCLAIMER
-----------------------------------------------------------------------------------------------
This indicator is for educational and informational use only. It does not provide financial advice or predictive output. Historical patterns do not guarantee future results. All users remain responsible for their own decisions. Use of this script implies agreement with PulseWire's Terms of Use.
RTH Gap [TakingProphets] marks the Opening Range Gap: the gap between the prior regular-session close and the next regular-session open.
It measures from the prior RTH close at 4:14 PM New York time to the next RTH open at 9:30 AM New York time, draws that range as a box, and overlays quadrant levels at 0, 25, 50, 75, and 100 percent.
This indicator does not provide trading signals, entries, or forecasts. It is a visualization aid for studying the Opening Range Gap within an ICT-style analytical framework.
The Opening Range Gap (ORG) is the space between where the regular session closed and where it reopened the next day. Within ICT-style education, this gap and its internal quadrants, especially the 50 percent midpoint, are studied for how price reacts when it trades back into them. This tool marks the gap and its quadrants automatically so they can be reviewed objectively rather than drawn by hand.
PURPOSE AND SCOPE
-----------------------------------------------------------------------------------------------
The tool serves as a research and study aid to document and analyze the Opening Range Gap and its internal levels.
It is commonly used to:
Automate the marking of the daily RTH gap and its quadrants.
Study how price reacts at the 50 percent midpoint and the other quadrant levels.
Keep several prior gaps on the chart for multi-day review.
Journal how often a gap is filled, respected, or rejected.
Teach the Opening Range Gap concept in a mentorship or training context.
LOGIC STRUCTURE
-----------------------------------------------------------------------------------------------
RTH Gap detects the gap on the 1-minute series and displays it consistently on any chart timeframe.
Detection
The prior RTH close is captured at 4:14 PM New York time.
The next RTH open is captured at 9:30 AM New York time.
The gap between those two prices becomes the range for that session.
Detection runs on the 1-minute series and its values are latched, so the gap displays correctly whether the chart is on a low or high timeframe.
Quadrants
The gap is drawn as a box, with horizontal levels at 0, 25, 50, 75, and 100 percent of the range.
Each level can be toggled, colored, and styled independently, and optionally labeled with its percentage and formation date.
Selection and Retention
The number of gaps shown is user controlled.
Gaps can be selected either by how recently they formed or by proximity of their midpoint to current price.
An IPDA lookback setting controls how far back gaps are retained before being pruned.
COMPONENTS AND VISUALS
-----------------------------------------------------------------------------------------------
Gap Box — The range between the prior RTH close and the next RTH open.
Quadrant Levels — Horizontal lines at 0, 25, 50, 75, and 100 percent of the gap.
Quadrant Labels — Optional labels showing each level's percentage and, if enabled, the gap's formation date.
INPUT CATEGORIES
-----------------------------------------------------------------------------------------------
General — Enable toggle, IPDA lookback length, date-prefix and quadrant-label toggles, and the selection mode (Most recent or Proximity).
Opening Range Gaps — Master visibility and how many gaps to display.
Opening Range Gap Style — Box color, fill and border options, gradient toggle, label color and size, and independent visibility, color, style, and width for each of the five quadrant levels.
USAGE GUIDELINES
-----------------------------------------------------------------------------------------------
RTH Gap is suited for the review and documentation of Opening Range Gap behavior.
Recommended educational workflows:
Mark the daily RTH gap and review how price interacts with its 50 percent midpoint.
Keep two or three prior gaps on the chart to study multi-day reactions.
Compare gaps that fill quickly against those that hold as support or resistance.
Switch between Most recent and Proximity modes depending on the study.
Teach the Opening Range Gap concept in mentorship or training sessions.
The tool is oriented toward regular-session index futures, where the RTH gap is most applicable.
OPERATIONAL NOTES AND LIMITATIONS
-----------------------------------------------------------------------------------------------
Detection is based on the 4:14 PM and 9:30 AM New York session times and is oriented toward regular-session instruments.
Gap values are latched from the 1-minute series so they display on any chart timeframe.
The selection mode and display count control which gaps appear, not how many are detected.
The IPDA lookback setting controls how far back gaps are retained.
The box, quadrant lines, and labels are visual study aids only.
This tool does not include setups, entries, targets, or alerts.
ORIGINALITY AND ATTRIBUTION
-----------------------------------------------------------------------------------------------
The detection and rendering engine is written from scratch in Pine v6, using a latched 1-minute session-time detector so the gap displays on any timeframe, a quadrant gradient system with per-level styling, two selection modes, and a lookback-based retention system.
Core concepts such as the Opening Range Gap and its quadrant levels are publicly taught within ICT-style market education. This implementation was designed and engineered by TakingProphets.
TERMS AND DISCLAIMER
-----------------------------------------------------------------------------------------------
This indicator is for educational and informational use only. It does not provide financial advice or predictive output. Historical patterns do not guarantee future results. All users remain responsible for their own decisions. Use of this script implies agreement with PulseWire's Terms of Use.
Open-source script
In true PulseWire 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 PulseWire. Read more in the Terms of Use.
Open-source script
In true PulseWire 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 PulseWire. Read more in the Terms of Use.
