OPEN-SOURCE SCRIPT
Opening Range Box, 2 Sessions

Opening Range & Session Box Indicator
This indicator automatically draws Opening Range (OR) boxes and Session Boxes based on specific time zone settings, helping you visualize key trading periods across different global markets.
Key Features:
Custom Sessions: Define two independent trading sessions (e.g., New York and London).
Time Zone Selection: Choose the exact time zone for each session from a simple dropdown menu, ensuring accurate session mapping regardless of your chart's time zone.
Opening Range Definition: The initial portion of each session (defined by the Opening Range Minutes input) establishes the high and low of the box.
Offset Lines: Automatically draws two percentage offset lines inside the box, allowing you to easily track price movement relative to the Opening Range high and low (e.g., 10% retracement levels).
How to Use the Inputs:
Session A/B Timezone - Select the time zone for Session A (e.g., America/New_York).
Session A/B Time - Define the start and end time for Session A (e.g., 0930-1600).
Opening Range Minutes - Set how long the initial opening range period lasts (e.g., 30 minutes).
Percent from High/Low for Line - Set the percentage distance for the inner offset lines (e.g., 10.0 for 10% retracement).
Number of Boxes to Show - Controls the number of historical session boxes and lines that remain visible on the chart.
This indicator automatically draws Opening Range (OR) boxes and Session Boxes based on specific time zone settings, helping you visualize key trading periods across different global markets.
Key Features:
Custom Sessions: Define two independent trading sessions (e.g., New York and London).
Time Zone Selection: Choose the exact time zone for each session from a simple dropdown menu, ensuring accurate session mapping regardless of your chart's time zone.
Opening Range Definition: The initial portion of each session (defined by the Opening Range Minutes input) establishes the high and low of the box.
Offset Lines: Automatically draws two percentage offset lines inside the box, allowing you to easily track price movement relative to the Opening Range high and low (e.g., 10% retracement levels).
How to Use the Inputs:
Session A/B Timezone - Select the time zone for Session A (e.g., America/New_York).
Session A/B Time - Define the start and end time for Session A (e.g., 0930-1600).
Opening Range Minutes - Set how long the initial opening range period lasts (e.g., 30 minutes).
Percent from High/Low for Line - Set the percentage distance for the inner offset lines (e.g., 10.0 for 10% retracement).
Number of Boxes to Show - Controls the number of historical session boxes and lines that remain visible on the chart.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
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.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
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.