OPEN-SOURCE SCRIPT
Multi-Session ORB (NY / London / Asia) - One Indicator

## 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.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.