OPEN-SOURCE SCRIPT
Multi-Session Range Boxes (Asia, Europe, New York)

## What this script does
**Multi-Session ORB (NY / London / Asia) - One Indicator** builds Opening Range Boxes for the three major trading sessions using one unified engine:
- New York session ORB
- London session ORB
- Asia session ORB
It is designed for traders who trade ORB and session-based structure and want all three sessions managed consistently by a single tool, instead of stacking multiple separate indicators.
---
## Core Logic & How It Works
For each enabled session, the script:
1. **Defines a configurable Opening Range window**
- Example defaults:
- NY: 09:30–09:45
- London: 03:00–03:15 (ET)
- Asia: 20:00–20:15 (ET)
2. **Builds the Opening Range**
- During the chosen window, it continuously tracks the highest high and lowest low.
- At the end of the window, that high/low becomes the official ORB for that session.
3. **Draws and extends the ORB box**
- A box is drawn from the start of the ORB window to its end, between the ORB high and low.
- During the user-defined “Extend/Show Until” window for that session, the box is extended in time so you can see how price behaves relative to that fixed opening range.
4. **Detects breakouts**
- During the extension window:
- If price crosses above the ORB high → potential long breakout condition.
- If price crosses below the ORB low → potential short breakout condition.
- These conditions are session-specific (NY, London, Asia) and exposed via alertconditions.
5. **Alerts with structured messages**
- Alerts are provided for:
- NY ORB Breakout UP / DOWN
- London ORB Breakout UP / DOWN
- Asia ORB Breakout UP / DOWN
- Messages are JSON-style, making them easy to integrate with webhooks or bots.
---
## Why this is a single, original tool (not a random mashup)
- Uses **one shared ORB function** to manage all sessions consistently.
- Encodes both:
- Visual structure (session ranges as bands on price).
- Mechanical logic (session-specific breakout signals + automation-ready alerts).
- Focuses specifically on global session ORB behavior in a compact overlay, instead of recreating generic tools or hiding basic code as a closed-source clone.
This makes it:
- Transparent: logic is clearly visible in the code.
- Practical: directly supports ORB traders across NY / London / Asia.
- Distinct: three sessions, one engine, one indicator.
---
## How to Use
1. **Session visualization**
- Enable/disable NY, London, and Asia ranges as needed.
- Use the colored bands to see where current price sits relative to each session’s ORB.
- Default: New York is highlighted in yellow for quick recognition.
2. **Strategy building**
- Use the ORB high/low as key decision levels:
- Trade confirmed breakouts.
- Fade failed breakouts back into the range.
- Track how later sessions interact with earlier session ranges.
3. **Alerts for automation**
- Set alerts on the built-in conditions to:
- Trigger entries in your own system.
- Send signals to a Discord/Telegram/bot via webhooks.
- No extra indicator is required to identify the session or the breakout.
---
## Publication Notes
- Title uses standard ASCII characters, as required.
- Chart for publication should be kept **clean**:
- Candles + this ORB indicator only, or any additional drawings strictly used to illustrate how to read the ranges.
- Description explains:
- What the script does,
- How it does it,
- How traders can use it,
- Why it is a coherent, original tool rather than an arbitrary mashup.
**Multi-Session ORB (NY / London / Asia) - One Indicator** builds Opening Range Boxes for the three major trading sessions using one unified engine:
- New York session ORB
- London session ORB
- Asia session ORB
It is designed for traders who trade ORB and session-based structure and want all three sessions managed consistently by a single tool, instead of stacking multiple separate indicators.
---
## Core Logic & How It Works
For each enabled session, the script:
1. **Defines a configurable Opening Range window**
- Example defaults:
- NY: 09:30–09:45
- London: 03:00–03:15 (ET)
- Asia: 20:00–20:15 (ET)
2. **Builds the Opening Range**
- During the chosen window, it continuously tracks the highest high and lowest low.
- At the end of the window, that high/low becomes the official ORB for that session.
3. **Draws and extends the ORB box**
- A box is drawn from the start of the ORB window to its end, between the ORB high and low.
- During the user-defined “Extend/Show Until” window for that session, the box is extended in time so you can see how price behaves relative to that fixed opening range.
4. **Detects breakouts**
- During the extension window:
- If price crosses above the ORB high → potential long breakout condition.
- If price crosses below the ORB low → potential short breakout condition.
- These conditions are session-specific (NY, London, Asia) and exposed via alertconditions.
5. **Alerts with structured messages**
- Alerts are provided for:
- NY ORB Breakout UP / DOWN
- London ORB Breakout UP / DOWN
- Asia ORB Breakout UP / DOWN
- Messages are JSON-style, making them easy to integrate with webhooks or bots.
---
## Why this is a single, original tool (not a random mashup)
- Uses **one shared ORB function** to manage all sessions consistently.
- Encodes both:
- Visual structure (session ranges as bands on price).
- Mechanical logic (session-specific breakout signals + automation-ready alerts).
- Focuses specifically on global session ORB behavior in a compact overlay, instead of recreating generic tools or hiding basic code as a closed-source clone.
This makes it:
- Transparent: logic is clearly visible in the code.
- Practical: directly supports ORB traders across NY / London / Asia.
- Distinct: three sessions, one engine, one indicator.
---
## How to Use
1. **Session visualization**
- Enable/disable NY, London, and Asia ranges as needed.
- Use the colored bands to see where current price sits relative to each session’s ORB.
- Default: New York is highlighted in yellow for quick recognition.
2. **Strategy building**
- Use the ORB high/low as key decision levels:
- Trade confirmed breakouts.
- Fade failed breakouts back into the range.
- Track how later sessions interact with earlier session ranges.
3. **Alerts for automation**
- Set alerts on the built-in conditions to:
- Trigger entries in your own system.
- Send signals to a Discord/Telegram/bot via webhooks.
- No extra indicator is required to identify the session or the breakout.
---
## Publication Notes
- Title uses standard ASCII characters, as required.
- Chart for publication should be kept **clean**:
- Candles + this ORB indicator only, or any additional drawings strictly used to illustrate how to read the ranges.
- Description explains:
- What the script does,
- How it does it,
- How traders can use it,
- Why it is a coherent, original tool rather than an arbitrary mashup.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.