OPEN-SOURCE SCRIPT
Diupdate ORB 9:30 (30m & 5m)

ORB 9:30 (30m & 5m)
Marks the high and low of the opening range at 9:30 AM (New York session) on two timeframes — the first 30-minute candle (9:30–10:00) and the first 5-minute candle (9:30–9:35) — then draws horizontal lines at those levels for use as intraday support/resistance targets.
How it works:
Each day, the script watches for price action inside the 9:30 window and tracks the running high/low.
When the window closes, it draws two lines (high and low) starting at the window's open time and extending forward a configurable number of bars.
If your chart timeframe is finer than 30m/5m (e.g. viewing on a 1m chart), it builds the range directly from the visible bars. If your chart is coarser (e.g. viewing on an hourly chart), it pulls intrabar data via request.security_lower_tf to reconstruct the 9:30 candle that would otherwise be hidden inside a larger bar.
A "days back" input limits how many days of historical lines get drawn, so the chart doesn't get cluttered.
Inputs:
Toggle high/low lines independently for each timeframe
Separate colors for the 30m and 5m sets
Line width, style (solid/dashed/dotted), and how many bars each line extends
Session timezone (defaults to America/New_York, DST-aware)
Useful as an Opening Range Breakout (ORB) reference — many intraday strategies use the 9:30 opening range high/low as breakout or fade levels.
Marks the high and low of the opening range at 9:30 AM (New York session) on two timeframes — the first 30-minute candle (9:30–10:00) and the first 5-minute candle (9:30–9:35) — then draws horizontal lines at those levels for use as intraday support/resistance targets.
How it works:
Each day, the script watches for price action inside the 9:30 window and tracks the running high/low.
When the window closes, it draws two lines (high and low) starting at the window's open time and extending forward a configurable number of bars.
If your chart timeframe is finer than 30m/5m (e.g. viewing on a 1m chart), it builds the range directly from the visible bars. If your chart is coarser (e.g. viewing on an hourly chart), it pulls intrabar data via request.security_lower_tf to reconstruct the 9:30 candle that would otherwise be hidden inside a larger bar.
A "days back" input limits how many days of historical lines get drawn, so the chart doesn't get cluttered.
Inputs:
Toggle high/low lines independently for each timeframe
Separate colors for the 30m and 5m sets
Line width, style (solid/dashed/dotted), and how many bars each line extends
Session timezone (defaults to America/New_York, DST-aware)
Useful as an Opening Range Breakout (ORB) reference — many intraday strategies use the 9:30 opening range high/low as breakout or fade levels.
Catatan Rilis
// ═══════════════════════════ FIRST ZONE BREAKOUT ═══════════════════════════// Only active on exactly the 1m or 5m chart (not the broader <5m / 5-30m
// ranges the engulfing highlight uses):
// 1m chart -> breakout of the 5m zone (5m OR high/low)
// 5m chart -> breakout of the 30m zone (30m OR high/low)
// Anywhere else, the zone is na and nothing fires.
Catatan Rilis
// Each open trade keeps extending to the current bar and freezes once it// resolves; trades older than days5 (the same zone this plan is built on)
// get their drawings removed and are dropped from the list. This is fully
// independent of tradeDir/entryTaken (which only gate arming a NEW trade), so
// an unresolved trade keeps being tracked correctly across a day boundary.
Catatan Rilis
// resolves; trades older than days5 (the same zone this plan is built on)// get their drawings removed and are dropped from the list. This is fully
// independent of tradeDir/entryTaken (which only gate arming a NEW trade), so
// an unresolved trade keeps being tracked correctly across a day boundary.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
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.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
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.