PROTECTED SOURCE SCRIPT
Opening Range Breakout & Targets [Strategy] (Fixed + Alerts)

This strategy backtests a classic Opening Range Breakout approach using a configurable opening range window (time-based OR or custom session). Once the opening range is completed, the strategy waits for price to break above ORH (Opening Range High) or below ORL (Opening Range Low) and enters in the direction of the breakout.
Targets are derived directly from the opening range width:
OR Width = ORH − ORL
Target Step = OR Width × Target %
Take-profit is placed at the selected Target # (T1, T2, etc.)
An optional Daily Bias filter can be enabled to reduce false breakouts by comparing today’s opening range midpoint (ORM) to the previous session’s ORM. When bias is active, breakouts against the bias can require a stronger confirmation (break beyond the first target step).
Risk management is configurable via multiple stop options:
Stop at Opposite OR
Stop at OR Midpoint
Stop at 1× Target Step
Or disable stops for custom management
Includes support for:
Long/Short/Both modes
One trade per session option
Optional exit on opposite breakout
Separate alert conditions (when used with the companion indicator)
Note: This is a backtesting tool. Always validate results across symbols/timeframes and account for slippage/commissions before live use.
Targets are derived directly from the opening range width:
OR Width = ORH − ORL
Target Step = OR Width × Target %
Take-profit is placed at the selected Target # (T1, T2, etc.)
An optional Daily Bias filter can be enabled to reduce false breakouts by comparing today’s opening range midpoint (ORM) to the previous session’s ORM. When bias is active, breakouts against the bias can require a stronger confirmation (break beyond the first target step).
Risk management is configurable via multiple stop options:
Stop at Opposite OR
Stop at OR Midpoint
Stop at 1× Target Step
Or disable stops for custom management
Includes support for:
Long/Short/Both modes
One trade per session option
Optional exit on opposite breakout
Separate alert conditions (when used with the companion indicator)
Note: This is a backtesting tool. Always validate results across symbols/timeframes and account for slippage/commissions before live use.
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由使用,沒有任何限制 — 點擊此處了解更多。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由使用,沒有任何限制 — 點擊此處了解更多。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。