PROTECTED SOURCE SCRIPT
15-Min Opening Range Indicator & Breakout Targets (ORB)- Willy

🔍 Overview
The **15-Min ORB (Opening Range Breakout)** indicator automatically identifies the **first 15-minute high and low range** after a market opens — and plots breakout targets based on user-defined expansion multiples.
It’s designed for traders who use **Opening Range Breakout (ORB)** strategies across multiple markets or sessions — and want **precise timing adjusted to their own timezone**.
---
⚙️ Features
🕐 **Time-Zone Offset (Local Adjustment)**
* Automatically shift your ORB window to match your **local timezone**.
* No more guessing when “09:30” happens in your region.
* Simply set the **offset (hours ahead or behind chart time)** and the indicator adjusts everything automatically.
⏱ **15-Minute Opening Range**
* Plots the high and low of your chosen 15-minute window.
* Works with any market or trading session (NYSE, London, Tokyo, Crypto, etc.).
* User can define **custom start hour and minute**.
🎯 **Breakout Targets (TP1, TP2)**
* Automatically calculates and draws **Take Profit levels** using customizable expansion multiples.
* Configurable TP1 / TP2 lines and labels with selectable styles (solid, dashed, dotted).
💬 **Visual Labels**
* Clear text labels showing:
* 15m High and Low levels.
* TP1 and TP2 targets.
* Label placement (left or right) adjustable for chart preference.
🧹 **Automatic Daily Reset**
* Resets all levels and targets at your midnight (or market day boundary).
* Ensures clean new ORB levels every day.
🔔 **Breakout Alerts**
* Built-in TradingView alerts for:
* **Closed Above 15m High**
* **Closed Below 15m Low**
---
🧭 How to Use
1. **Add to Chart**
* Click “Add to Favorite Scripts” and apply to your desired symbol.
* Works best on intraday timeframes (1m–15m).
2. **Set Your Market Session**
* Choose your **Range Start Hour and Minute** (e.g., 9:30 for NYSE).
* Set **My Time Offset from Chart (hours)** — for example:
* NYSE 9:30 New York → Bangkok (+12 hours)
* London 8:00 → Bangkok (+7 hours)
* The indicator adjusts automatically.
3. **Monitor the Range**
* The first 15-minute high and low are drawn as purple lines.
* When price breaks above or below, TP levels appear.
4. **Trade Your Plan**
* Alerts trigger when candles close outside the range.
* Manage targets using the expansion multipliers.
---
🧮 Example Settings
| Market | Local Open (Your Time) | Range Start (chart time) | Offset | Notes |
| :----------- | :--------------------------------- | :----------------------- | :----- | :----------------------- |
| NYSE (US) | 9:30 AM New York → 9:30 PM Bangkok | 9 | +12 | Typical for Thai traders |
| LSE (UK) | 8:00 AM London → 3:00 PM Bangkok | 8 | +7 | EU market overlap |
| Tokyo | 9:00 AM Tokyo → 7:00 AM Bangkok | 9 | +2 | Asian session |
| Crypto (UTC) | 0:00 UTC → 7:00 AM Bangkok | 0 | +7 | 24/7 markets |
---
📐 Parameters
### 15-Minute Range
* **Display 15-Minute Range** — toggles the range lines.
* **Show 15-Minute Labels** — toggles the range high/low labels.
* **Range Start Hour / Minute** — defines the start of your 15m window.
* **My Time Offset from Chart (hours)** — shifts the calculation to your local time.
* **Range Color / Style** — customize the look of your range lines.
### Targets
* **TP1 Expansion Multiple** — default `1.0` (equal to full range).
* **TP2 Expansion Multiple** — default `2.0`.
* **Show TP1 / TP2 Levels & Labels** — toggle individually.
* **TP Label Color** — customize breakout target visuals.
### Labels
* **Label Position (Left/Right)** — choose where labels appear on chart.
---
## 💡 Strategy Ideas
* Combine with volume or volatility filters for better confirmation.
* Use alongside VWAP, EMA, or session profiles for confluence.
* Apply on different markets:
* **Stocks (NYSE, NASDAQ)** — morning ORB strategy.
* **FX (London Open)** — volatility breakout.
* **Crypto (UTC 00:00)** — daily range breakout.
---
🧩 Technical Notes
* Built in **Pine Script v6**.
* Works on all intraday timeframes.
* Time calculations are local-adjusted using integer offset logic (avoids DST issues).
* No repainting — range values lock once 15m window completes.
---
🚀 Author Notes
Created for traders who want **simple, reliable ORB logic that respects your timezone**.
No unnecessary complexity — everything resets cleanly each day.
Tested and verified on:
* BTCUSD (Binance)
* ES1! (CME Futures)
* NAS100 / SPX500
* EURUSD / GBPJPY
* Thai SET50 index
---
🔔 Alerts
* “Closed Above 15m High”
* “Closed Below 15m Low”
You can configure custom alerts with your own messages.
---
## ⚠️ Disclaimer
This script is **for educational purposes only**.
It does not constitute financial advice or guarantee results.
Always backtest and trade responsibly.
Script protegido
Este script se publica como código cerrado. Sin embargo, puede utilizarlo libremente y sin limitaciones: obtenga más información aquí.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.
Script protegido
Este script se publica como código cerrado. Sin embargo, puede utilizarlo libremente y sin limitaciones: obtenga más información aquí.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.