OPEN-SOURCE SCRIPT
15-Min ORB Strategy with TP/SL

🔧 How It Works
Opening Range Defined
At market open, it tracks the first 15-minute candle.
The high and low of that candle form the Opening Range.
Breakout Detection
A Buy Signal is triggered when price closes above the ORB high (with confirmation).
A Sell Signal is triggered when price closes below the ORB low.
Trade Management
On a confirmed breakout, the script:
Records the entry price.
Calculates Take Profit (TP) and Stop Loss (SL) using user-defined multipliers of the ORB range.
Positions are exited when either TP or SL is hit.
State Tracking
It tracks whether you're in a trade and whether it’s a long or short.
Once exited, the trade resets and waits for a new signal the next session.
📌 Visual Elements
Green line: ORB High
Red line: ORB Low
Blue line: Active Take Profit (if in trade)
Orange line: Active Stop Loss (if in trade)
Buy/Sell Labels: Signal markers below/above candles for clear entry visibility
⚙️ Customizable Inputs
Take Profit Multiplier (default 1.5× ORB range)
Stop Loss Multiplier (default 1.0× ORB range)
Session Start/End time for ORB definition
✅ Ideal For:
Traders who want clean, rule-based signals with no indicators
Quick intraday setups using price action only
Adaptation to almost any liquid market (just adjust session times)
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。