OPEN-SOURCE SCRIPT
Adaptive Opening Range Context Engine

OVERVIEW
Adaptive Opening Range Context Engine is a session-based market structure tool designed to analyze how price behaves around a defined opening range.
Instead of treating every move beyond an opening range as an immediate breakout signal, the engine follows the development of the range through a structured lifecycle. It evaluates range size relative to volatility, participation conditions, price acceptance or rejection outside the range, retests, expansion behavior, and the distribution of activity formed during the opening-range period.
The objective is to provide contextual information about the opening auction rather than predict future price direction.
CORE METHODOLOGY
The engine follows the following analytical sequence:
Opening Range Formation → Range Lock → Range Quality → Break Attempt → Acceptance / Rejection → Retest → Expansion / Failure
The default opening range is calculated from the 09:30–10:00 America/New_York session and can be adjusted from the settings.
The range can be constructed using either High/Low or Close-based boundaries.
RANGE QUALITY
Once the opening range is complete, its width is normalized against ATR.
This produces a relative Range/ATR measurement used to classify the opening environment as:
Compressed
Balanced
Expanded
This normalization helps distinguish a relatively narrow opening range from one that already represents substantial movement relative to recent volatility.
These classifications describe the observed range environment and are not probability estimates.
BREAKOUT LIFECYCLE
Price moving beyond an opening-range boundary does not automatically qualify as sustained acceptance.
The engine distinguishes between:
Upper Break Attempt
Lower Break Attempt
Upper Acceptance
Lower Acceptance
Upper Rejection / Failure
Lower Rejection / Failure
Retest
Expansion
Acceptance requires confirmed price behavior outside the relevant boundary rather than relying solely on an intrabar excursion.
This lifecycle approach is intended to separate a simple boundary test from a more developed structural response.
PARTICIPATION CONTEXT
The engine compares current volume with a rolling volume baseline and classifies participation as:
Light
Normal
Elevated
Volume is used as contextual information rather than as a standalone directional signal.
For instruments where the available volume represents tick volume or another feed-specific measure, the interpretation should be adjusted accordingly.
OPENING RANGE PARTICIPATION PROFILE
The script includes a native Opening Range Participation Profile.
During formation of the opening range, volume from each range bar is assigned to configurable price buckets using that bar's representative price. The resulting distribution is displayed horizontally inside the opening-range structure.
The largest concentration is identified as the OR POC.
This profile is intentionally described as a participation proxy. It is not an exchange order-book reconstruction and should not be interpreted as true transaction-level volume-at-price when the underlying chart data does not provide that information.
Its purpose is to visualize where activity was relatively concentrated during formation of the opening range.
VISUAL SYSTEM
The chart displays:
Opening Range High
Opening Range Low
Opening Range Equilibrium
Opening Range Participation Profile
OR POC
Upper and lower expansion references
Acceptance and rejection lifecycle events
Current opening-range context
Historical opening ranges with reduced visual emphasis
The current session remains visually dominant while completed sessions provide background structural context.
DASHBOARD
The dashboard summarizes the active opening-range environment through:
STATE — current lifecycle state
RANGE — volatility-normalized range classification
RANGE / ATR — opening-range width relative to ATR
VOLUME — current participation classification
MIDPOINT — opening-range equilibrium
CONTEXT — current upper, lower, or neutral structural context
PROFILE — participation-profile status
HOW TO USE
The indicator is designed primarily for intraday analysis.
First allow the configured opening range to form and lock. After the range is established, observe how price interacts with its boundaries.
A move outside the range can then be evaluated together with the engine's acceptance/rejection state, Range/ATR environment, participation context, OR POC, equilibrium, and subsequent retest behavior.
The tool is intended to provide structured context for discretionary analysis. No individual state, level, profile concentration, or lifecycle event should be interpreted independently as a trade instruction.
CONFIRMATION AND LIMITATIONS
The indicator operates from chart data and does not have access to hidden institutional orders or a complete market-wide order book.
Opening-range behavior can vary substantially between instruments and trading sessions.
Volume quality also depends on the underlying data source.
The Participation Profile is an internally constructed proxy based on the bars available during the opening range. It should not be interpreted as tick-by-tick exchange volume-at-price unless the underlying data itself provides that level of information.
ATR normalization describes the relative size of the opening range; it does not forecast the probability or magnitude of a future move.
Acceptance, rejection, retest, and expansion classifications describe observed price behavior and do not guarantee continuation or reversal.
The configured opening session and timezone should be adjusted when analyzing instruments whose primary trading session differs from the default configuration.
ORIGINALITY
Adaptive Opening Range Context Engine was independently developed around a state-based opening-range framework.
Its primary distinction is the integration of volatility-normalized range classification, participation context, confirmed breakout acceptance/rejection, retest and expansion lifecycle tracking, and an internally constructed Opening Range Participation Profile within one coordinated analytical workflow.
These components are designed to interact as parts of the same opening-range state model rather than operate as unrelated indicator modules.
The script is intended for educational and analytical use and does not attempt to reproduce the proprietary methodology of another indicator.
Release Notes — v1.1
Version 1.1
Introduced the native Opening Range Participation Profile and OR POC visualization.
Expanded the visual framework with clearer Opening Range High, Low and Equilibrium references, contextual expansion zones, current-session emphasis and subdued historical opening ranges.
Refined the dashboard to include participation-profile status while preserving the existing opening-range lifecycle, ATR-normalized range classification, volume context and acceptance/rejection framework.
Improved chart presentation and session-object lifecycle management for cleaner intraday analysis.
Adaptive Opening Range Context Engine is a session-based market structure tool designed to analyze how price behaves around a defined opening range.
Instead of treating every move beyond an opening range as an immediate breakout signal, the engine follows the development of the range through a structured lifecycle. It evaluates range size relative to volatility, participation conditions, price acceptance or rejection outside the range, retests, expansion behavior, and the distribution of activity formed during the opening-range period.
The objective is to provide contextual information about the opening auction rather than predict future price direction.
CORE METHODOLOGY
The engine follows the following analytical sequence:
Opening Range Formation → Range Lock → Range Quality → Break Attempt → Acceptance / Rejection → Retest → Expansion / Failure
The default opening range is calculated from the 09:30–10:00 America/New_York session and can be adjusted from the settings.
The range can be constructed using either High/Low or Close-based boundaries.
RANGE QUALITY
Once the opening range is complete, its width is normalized against ATR.
This produces a relative Range/ATR measurement used to classify the opening environment as:
Compressed
Balanced
Expanded
This normalization helps distinguish a relatively narrow opening range from one that already represents substantial movement relative to recent volatility.
These classifications describe the observed range environment and are not probability estimates.
BREAKOUT LIFECYCLE
Price moving beyond an opening-range boundary does not automatically qualify as sustained acceptance.
The engine distinguishes between:
Upper Break Attempt
Lower Break Attempt
Upper Acceptance
Lower Acceptance
Upper Rejection / Failure
Lower Rejection / Failure
Retest
Expansion
Acceptance requires confirmed price behavior outside the relevant boundary rather than relying solely on an intrabar excursion.
This lifecycle approach is intended to separate a simple boundary test from a more developed structural response.
PARTICIPATION CONTEXT
The engine compares current volume with a rolling volume baseline and classifies participation as:
Light
Normal
Elevated
Volume is used as contextual information rather than as a standalone directional signal.
For instruments where the available volume represents tick volume or another feed-specific measure, the interpretation should be adjusted accordingly.
OPENING RANGE PARTICIPATION PROFILE
The script includes a native Opening Range Participation Profile.
During formation of the opening range, volume from each range bar is assigned to configurable price buckets using that bar's representative price. The resulting distribution is displayed horizontally inside the opening-range structure.
The largest concentration is identified as the OR POC.
This profile is intentionally described as a participation proxy. It is not an exchange order-book reconstruction and should not be interpreted as true transaction-level volume-at-price when the underlying chart data does not provide that information.
Its purpose is to visualize where activity was relatively concentrated during formation of the opening range.
VISUAL SYSTEM
The chart displays:
Opening Range High
Opening Range Low
Opening Range Equilibrium
Opening Range Participation Profile
OR POC
Upper and lower expansion references
Acceptance and rejection lifecycle events
Current opening-range context
Historical opening ranges with reduced visual emphasis
The current session remains visually dominant while completed sessions provide background structural context.
DASHBOARD
The dashboard summarizes the active opening-range environment through:
STATE — current lifecycle state
RANGE — volatility-normalized range classification
RANGE / ATR — opening-range width relative to ATR
VOLUME — current participation classification
MIDPOINT — opening-range equilibrium
CONTEXT — current upper, lower, or neutral structural context
PROFILE — participation-profile status
HOW TO USE
The indicator is designed primarily for intraday analysis.
First allow the configured opening range to form and lock. After the range is established, observe how price interacts with its boundaries.
A move outside the range can then be evaluated together with the engine's acceptance/rejection state, Range/ATR environment, participation context, OR POC, equilibrium, and subsequent retest behavior.
The tool is intended to provide structured context for discretionary analysis. No individual state, level, profile concentration, or lifecycle event should be interpreted independently as a trade instruction.
CONFIRMATION AND LIMITATIONS
The indicator operates from chart data and does not have access to hidden institutional orders or a complete market-wide order book.
Opening-range behavior can vary substantially between instruments and trading sessions.
Volume quality also depends on the underlying data source.
The Participation Profile is an internally constructed proxy based on the bars available during the opening range. It should not be interpreted as tick-by-tick exchange volume-at-price unless the underlying data itself provides that level of information.
ATR normalization describes the relative size of the opening range; it does not forecast the probability or magnitude of a future move.
Acceptance, rejection, retest, and expansion classifications describe observed price behavior and do not guarantee continuation or reversal.
The configured opening session and timezone should be adjusted when analyzing instruments whose primary trading session differs from the default configuration.
ORIGINALITY
Adaptive Opening Range Context Engine was independently developed around a state-based opening-range framework.
Its primary distinction is the integration of volatility-normalized range classification, participation context, confirmed breakout acceptance/rejection, retest and expansion lifecycle tracking, and an internally constructed Opening Range Participation Profile within one coordinated analytical workflow.
These components are designed to interact as parts of the same opening-range state model rather than operate as unrelated indicator modules.
The script is intended for educational and analytical use and does not attempt to reproduce the proprietary methodology of another indicator.
Release Notes — v1.1
Version 1.1
Introduced the native Opening Range Participation Profile and OR POC visualization.
Expanded the visual framework with clearer Opening Range High, Low and Equilibrium references, contextual expansion zones, current-session emphasis and subdued historical opening ranges.
Refined the dashboard to include participation-profile status while preserving the existing opening-range lifecycle, ATR-normalized range classification, volume context and acceptance/rejection framework.
Improved chart presentation and session-object lifecycle management for cleaner intraday analysis.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
Get exclusive analysis and trade setups on my Telegram channel: t.me/+ljltWsU9ex01YTQ0
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
Get exclusive analysis and trade setups on my Telegram channel: t.me/+ljltWsU9ex01YTQ0
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.