PROTECTED SOURCE SCRIPT
已更新

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

425

🔍 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.


發行說明
The 15-Min Willy ORB (Opening Range Breakout) indicator automatically identifies the first 15-minute high and low range for key global market opens — and plots breakout targets based on user-defined expansion multiples.

It’s designed for traders who trade Gold (XAU/USD), FX, or indices, using the most active market sessions (Shanghai, Tokyo, Sydney, Frankfurt, London, and New York) — without needing to manually set times.



⚙️ Features

🕐 Automatic Session Detection
• Six built-in sessions: Shanghai, Tokyo, Sydney, Frankfurt, London, and New York.
• Each session’s 15-minute range and targets are plotted automatically.
• No need to set start times — just toggle sessions on or off.

🌍 Time-Zone Offset
• Adjust all sessions to your local clock with one setting.
• Keeps your chart perfectly aligned no matter where you trade from.

🎯 Breakout Targets (TP1, TP2)
• Auto-calculates expansion-based take-profit levels.
• Customize multipliers (default: TP1 = 1.0×, TP2 = 2.0×).
• Optional TP labels and line styles (solid, dashed, dotted).

💬 Visual Clarity
• 15-minute range lines labeled with session name and price.
• Clean automatic resets each day for a fresh ORB.

🔔 Built-in Alerts
• Alerts when price closes above the high or below the low of the session’s range.



🧭 How to Use
1. Add to Chart
• Click “Add to Favorite Scripts” → Apply to your instrument (e.g., XAU/USD).
• Works best on 1m–15m timeframes.
2. Choose Sessions
• Toggle ON any session you want to track:
• 🟢 Shanghai – sets early tone for Gold liquidity.
• 🟣 Tokyo – quieter, range-defining period.
• 🔵 Sydney – pre-Asia overlap.
• 🟡 Frankfurt – first EU volatility.
• 🧡 London – high-impact session for XAU/USD.
• 💚 New York – major breakout and continuation zone.
3. Adjust Time Offset (if needed)
• Set your local offset from chart time (e.g. +7 for Bangkok).
• Lines will auto-sync with the real-world open times of each session.
4. Watch the Range & Breakouts
• Each session’s 15-minute high/low is drawn as solid lines.
• When price breaks out and closes beyond them, TP1 and TP2 are drawn.
• Optional alerts will trigger on confirmed breakouts.



💡 Tips for Gold (XAU/USD) Traders
• London → often gives the cleanest ORB breakouts.
• New York → drives continuation after U.S. data releases.
• Frankfurt & London overlap → ideal for volatility setups.
• Asia (Shanghai/Tokyo) → defines structure before momentum builds.

Combine session breakouts with volume, volatility, or trend filters for best results.

🚀 Author Notes

Made for traders who want clean, timezone-accurate ORB levels without manual setup.
Designed to work intuitively with Gold (XAU/USD), major FX pairs, and indices.



🔔 Alerts
• “Closed Above 15m High”
• “Closed Below 15m Low”

Set these for each session to catch momentum early.



⚠️ Disclaimer

This tool is for educational purposes only.
Not financial advice. Always test and manage risk appropriately.

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。