OPEN-SOURCE SCRIPT

Multi-Session ORB

137
The Multi-Session ORB Indicator is a customizable Pine Script (version 6) tool designed for TradingView to plot Opening Range Breakout (ORB) levels across four major trading sessions: Sydney, Tokyo, London, and New York. It allows traders to define specific ORB durations and session times in Central Daylight Time (CDT), making it adaptable to various trading strategies.
Key Features:
1. Customizable ORB Duration: Users can set the ORB duration (default: 15 minutes) via the inputMax parameter, determining the time window for calculating the high and low of each session’s opening range.
2. Flexible Session Times: The indicator supports user-defined session and ORB times for:
◦ Sydney: Default ORB (17:00–17:15 CDT), Session (17:00–01:00 CDT)
◦ Tokyo: Default ORB (19:00–19:15 CDT), Session (19:00–04:00 CDT)
◦ London: Default ORB (02:00–02:15 CDT), Session (02:00–11:00 CDT)
◦ New York: Default ORB (08:30–08:45 CDT), Session (08:30–16:00 CDT)
3. Session-Specific ORB Levels: For each session, the indicator calculates and tracks the high and low prices during the specified ORB period. These levels are updated dynamically if new highs or lows occur within the ORB timeframe.
4. Visual Representation:
◦ ORB high and low lines are plotted only during their respective session times, ensuring clarity.
◦ Each session’s lines are color-coded for easy identification:
▪ Sydney: Green (high), Red (low)
▪ Tokyo: Blue (high), Orange (low)
▪ London: Purple (high), Yellow (low)
▪ New York: Aqua (high), Fuchsia (low)
◦ Lines are drawn with a linewidth of 2 and disappear when the session ends or if the timeframe is not intraday (or exceeds the ORB duration).
5 Intraday Compatibility: The indicator is optimized for intraday timeframes (e.g., 1-minute to 15-minute charts) and only displays when the chart’s timeframe multiplier is less than or equal to the ORB duration.
How It Works:
• Session Detection: The script uses the time() function to check if the current bar falls within the user-defined ORB or session time windows, accounting for all days of the week.
• ORB Logic: At the start of each session’s ORB period, the script initializes the high and low based on the first bar’s prices. It then updates these levels if subsequent bars within the ORB period exceed the current high or fall below the current low.
• Plotting: ORB levels are plotted as horizontal lines during the respective session, with visibility controlled to avoid clutter outside session times or on incompatible timeframes.
Use Case:
Traders can use this indicator to identify key breakout levels for each trading session, facilitating strategies based on price action around the opening range. The flexibility to adjust ORB and session times makes it suitable for various markets (e.g., forex, stocks, or futures) and time zones.
Limitations:
• The indicator is designed for intraday timeframes and may not display on higher timeframes (e.g., daily or weekly) or if the timeframe multiplier exceeds the ORB duration.
• Time inputs are in CDT, requiring users to adjust for their local timezone or market requirements.
This indicator is ideal for traders focusing on session-based breakout strategies, offering clear visualization and customization for global market sessions.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.