OPEN-SOURCE SCRIPT

ORB Strategy [LuciTech]

16 126
Credit:
Bassic ORB:
Basic ORB [MOT]

My Strategy Template:
The Best Strategy Template[LuciTech]



-What it does
This is a complete Opening Range Breakout (ORB) strategy that captures the first directional breakout after the New York market open. It defines the opening range using the 9:30–9:45 AM ET window, then monitors for a close above the high or below the low of that range within a 75-minute validity window (until 11:00 AM ET). Only the first confirmed breakout per day is traded — one long signal and one short signal maximum per ORB session.

-How it works
The script captures the highest high and lowest low formed between 9:30 and 9:45 AM ET each day. A midline (average of the high and low) is also calculated. After the ORB window closes, the strategy watches for the first candle that closes beyond either boundary. If no breakout occurs before 11:00 AM ET, no trade is taken for that day.
Entries are sized using a fixed percentage of equity risked per trade, with position size automatically calculated based on the distance to the chosen stop loss.

-Stop loss options
ATR — stop placed using Average True Range × multiplier
Candle — stop placed at the high/low of a specified number of candles back
Midline — stop placed at the ORB midpoint (halfway between the ORB high and low)

Take profit is set automatically using the configured Risk:Reward ratio. An optional breakeven feature moves the stop to entry price once a specified R multiple is reached.

-Relative Volume filter
An optional RVOL filter compares the breakout candle's volume against a simple moving average of the prior N bars. If the ratio does not meet the minimum threshold (e.g. 1.5 = 50% above average), the entry is skipped. The arrows still plot on all valid breakouts regardless of the RVOL filter, so you can visually review filtered-out signals. A debug label option is available to display the RVOL ratio on each signal bar for threshold calibration.

-Additional filters
Time filter — restrict entries to a custom time window
Day filter — select which days of the week to allow trades
Month filter — select which months to allow trades
Position type filter — allow longs only, shorts only, or both

-Alerts
The strategy supports webhook alerts in three formats: Standard JSON, Telegram JSON, and a concise Telegram format with emoji. Alerts fire on confirmed entry with entry price, stop loss, and take profit included.

Pernyataan Penyangkalan

Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.