OPEN-SOURCE SCRIPT
已更新 ORB - BO-RT-EN

This script is designed for the Opening Range Breakout (ORB) trader who seeks high-probability entries through price action confirmation. Unlike standard breakout tools that trigger on the first touch, this indicator requires a three-step validation process: Breakout, Retest, and Momentum Confirmation.
High-Level Summary
The script identifies the high and low of the first 5 minutes of the trading session (adjustable via inputs). It then monitors price action to find a confirmed breakout outside this range. To filter out "fakeouts," the script requires the price to return and touch the broken level (the retest) before signaling an entry. If at any point the price closes back inside the opening range before the setup is complete, the trade is invalidated and the sequence resets.
Core Features
How to Use the Script (Steps to Play)
1. Setup the Timeframe
Apply the indicator to a 1-minute chart. While the opening range is calculated based on the first 5 minutes, the entry logic requires the granularity of the 1-minute timeframe to detect precise retests.
2. Define the Range
By default, the script calculates the range from 09:30 to 09:35 EST. If you trade a different market (e.g., London Open or Crypto), adjust the "Opening Range Period" in the settings.
3. Monitor for the Breakout (BO)
Wait for a 1-minute candle to close above the High or below the Low. A label marked "BO" will appear on your chart.
4. The Retest (RT)
After the breakout, look for the price to "wick" or touch the breakout line. A triangle marked "RT" will appear.
Note: If the price closes back inside the range during this phase, the labels will disappear, signaling an invalid setup.
5. Execution (ENTRY)
Once the retest is complete, wait for the "ENTRY" arrow. This triggers when:
The user-defined candle delay (default: 1 bar) has passed since the retest.
The candle closes in the direction of the breakout (Green for Long / Red for Short).
6. Exit Strategy
Following the original strategy parameters, place your Stop Loss at the opposite end of the 5-minute opening range and set your Take Profit at a 2.0 Risk-to-Reward (2R) ratio from your entry price.
High-Level Summary
The script identifies the high and low of the first 5 minutes of the trading session (adjustable via inputs). It then monitors price action to find a confirmed breakout outside this range. To filter out "fakeouts," the script requires the price to return and touch the broken level (the retest) before signaling an entry. If at any point the price closes back inside the opening range before the setup is complete, the trade is invalidated and the sequence resets.
Core Features
- Sequential Signal Logic: Tracks the BO → RT → ENTRY process across distinct candles to prevent early entries.
- Momentum Confirmation: Entry arrows only trigger after a user-defined candle delay and a close in the trend direction.
- Visual Clarity: Plots high-visibility 5-minute range lines that persist until the market close.
- Advanced Invalidation: Automatically cancels setups if a "stop-run" or fakeout closes price back within the range.
- Scanner Ready: Includes specific alertcondition calls for Breakouts, Retests, and Entries, making it compatible with the TradingView Stock Screener.
How to Use the Script (Steps to Play)
1. Setup the Timeframe
Apply the indicator to a 1-minute chart. While the opening range is calculated based on the first 5 minutes, the entry logic requires the granularity of the 1-minute timeframe to detect precise retests.
2. Define the Range
By default, the script calculates the range from 09:30 to 09:35 EST. If you trade a different market (e.g., London Open or Crypto), adjust the "Opening Range Period" in the settings.
3. Monitor for the Breakout (BO)
Wait for a 1-minute candle to close above the High or below the Low. A label marked "BO" will appear on your chart.
4. The Retest (RT)
After the breakout, look for the price to "wick" or touch the breakout line. A triangle marked "RT" will appear.
Note: If the price closes back inside the range during this phase, the labels will disappear, signaling an invalid setup.
5. Execution (ENTRY)
Once the retest is complete, wait for the "ENTRY" arrow. This triggers when:
The user-defined candle delay (default: 1 bar) has passed since the retest.
The candle closes in the direction of the breakout (Green for Long / Red for Short).
6. Exit Strategy
Following the original strategy parameters, place your Stop Loss at the opposite end of the 5-minute opening range and set your Take Profit at a 2.0 Risk-to-Reward (2R) ratio from your entry price.
版本注释
This script is designed for the Opening Range Breakout (ORB) trader who seeks high-probability entries through price action confirmation. Unlike standard breakout tools that trigger on the first touch, this indicator requires a three-step validation process: Breakout, Retest, and Momentum Confirmation.High-Level Summary
The script identifies the high and low of the first 5 minutes of the trading session (adjustable via inputs). It then monitors price action to find a confirmed breakout outside this range. To filter out "fakeouts," the script requires the price to return and touch the broken level (the retest) before signaling an entry. If at any point the price closes back inside the opening range before the setup is complete, the trade is invalidated and the sequence resets.
Core Features
- Sequential Signal Logic: Tracks the BO → RT → ENTRY process across distinct candles to prevent early entries.
- Momentum Confirmation: Entry arrows only trigger after a user-defined candle delay and a close in the trend direction.
- Visual Clarity: Plots high-visibility 5-minute range lines that persist until the market close.
- Advanced Invalidation: Automatically cancels setups if a "stop-run" or fakeout closes price back within the range.
- Scanner Ready: Includes specific alertcondition calls for Breakouts, Retests, and Entries, making it compatible with the TradingView Stock Screener.
How to Use the Script (Steps to Play)
1. Setup the Timeframe: Apply the indicator to a 1-minute chart. While the opening range is calculated based on the first 5 minutes, the entry logic requires the granularity of the 1-minute timeframe to detect precise retests.
2. Define the Range: By default, the script calculates the range from 09:30 to 09:35 EST. If you trade a different market (e.g., London Open or Crypto), adjust the "Opening Range Period" in the settings.
3. Monitor for the Breakout (BO): Wait for a 1-minute candle to close above the High or below the Low. A label marked "BO" will appear on your chart.
4. The Retest (RT): After the breakout, look for the price to "wick" or touch the breakout line. A triangle marked "RT" will appear.
Note: If the price closes back inside the range during this phase, the labels will disappear, signaling an invalid setup.
5. Execution (ENTRY): Once the retest is complete, wait for the "ENTRY" arrow. This triggers when:
- The user-defined candle delay (default: 1 bar) has passed since the retest.
- The candle closes in the direction of the breakout (Green for Long / Red for Short).
6. Exit Strategy: Following the original strategy parameters, place your Stop Loss at the opposite end of the 5-minute opening range and set your Take Profit at a 2.0 Risk-to-Reward (2R) ratio from your entry price.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。