OPEN-SOURCE SCRIPT
ORB PRO by John K

ORB PRO identifies four price-action setups using the Opening Range, external swing liquidity, and an EMA. It includes configurable sessions, candle filters, alerts, and optional stop-loss and take-profit boxes.
The default Opening Range is 09:30–09:45, with signals enabled from 09:45–12:00, New York time. Both sessions are adjustable.
**Liquidity Sweeps — LQ BUY / SELL**
Price sweeps a confirmed swing low below the ORB or a swing high above it, then closes back inside the range with a bullish candle for buys or a bearish candle for sells.
By default, the sweep and confirmation must occur on separate candles. An optional filter restricts liquidity to swings confirmed before 09:45. Liquidity inside the ORB is excluded.
**ORB Rejections — ORB BUY / SELL**
Price tests the ORB low as support or the ORB high as resistance. The signal candle must close inside the range, match the trade direction, and have a body strictly larger than the previous candle.
Wicks through the boundary are allowed. A prior close through that boundary, or an external liquidity sweep on that side, disables its ORB rejection signals for the session.
**Breakout Retests — BO BUY / SELL**
After an ORB breakout, price retests the broken boundary. Confirmation can occur on a qualifying directional retest candle or immediately after an opposite-colored retest:
• Buy: red retest followed immediately by a larger green candle closing above ORB high.
• Sell: green retest followed immediately by a larger red candle closing below ORB low.
Optional close tolerance permits a small retest close inside the range, but the entry must still close outside the actual ORB. A deeper failed close locks both ordinary BO directions for the session.
**EMA Breakout Retests — EMA BO BUY / SELL**
Price breaks the ORB and EMA, then retests the EMA and confirms with a larger directional candle beyond both levels.
An optional filter requires the EMA to be outside the ORB when the range forms. A wrong-side EMA close before confirmation locks both EMA BO directions for the session.
**Filters and Visual Tools**
• Adjustable ORB retest, BO close, and EMA retest tolerances: 0–100 ticks.
• Optional minimum body-to-range filter to reduce doji-like signals.
• Optional red stop-loss and green take-profit boxes.
• Stops based on the signal candle, ATR, opposite ORB boundary, or confirmed swing.
• Targets include 1R, 2R, custom R, ORB boundaries where applicable, and ORB extensions.
• Approximate ORB volume profile with highlighted point of control.
• Individual and combined buy/sell alerts.
Signals confirm at candle close. This is an indicator, not an automated trading or backtesting strategy. SL/TP boxes are visual references, and signals do not guarantee profitable outcomes.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。