OPEN-SOURCE SCRIPT
ORB with Range Context

📌 What This Indicator Does
This indicator plots the Opening Range (OR) — the high and low established during a user-defined session window at market open — and provides context on the range's significance by comparing it to recent volatility.
After the opening range session completes, the indicator displays:
• ORB High and Low as horizontal reference levels
• Optional Midline (often acts as intraday support/resistance)
• Target projections at customizable multiples when breakout occurs
• Range Quality classification (Narrow / Normal / Wide)
🔬 How It Works
Step 1: Opening Range Capture
During the session window (default: 09:15–09:20 IST for Indian markets), the indicator tracks the highest high and lowest low. These become the day's Opening Range boundaries.
Step 2: Range Quality Analysis
This is where this indicator differs from standard ORB tools. It compares today's range to the instrument's Average True Range (ATR) and classifies it:
• NARROW — Range is less than 0.5× ATR
Interpretation: Price compression. The market opened in a tight range relative to recent volatility. Compression often precedes expansion — breakouts from narrow ranges can be more directional.
• NORMAL — Range is between 0.5× and 1.2× ATR
Interpretation: Typical opening behavior. Standard breakout expectations apply.
• WIDE — Range is greater than 1.2× ATR
Interpretation: The market opened with unusual volatility — possibly due to gaps, news events, or overnight developments. Wide ranges may indicate that much of the day's move has already occurred.
Step 3: Breakout Detection
A breakout is confirmed when price closes beyond the ORB High or Low (not just wicks through). The indicator tracks the first breakout direction each day.
Step 4: Target Projection
On confirmed breakout, targets are calculated using the ORB range as the measurement unit:
• Target 1 = Breakout Level ± (Range × 1.0)
• Target 2 = Breakout Level ± (Range × 1.5)
• Target 3 = Breakout Level ± (Range × 2.0)
⚙️ Settings Guide
Opening Range Settings
• ORB Session Window — Time window for capturing the range. Default: 0915-0920 (first 5 min for NSE/BSE) or 0915-10:00(first 45 mins for NSE/BSE. US Markets: 0930-0935 or 0930-0945.
• Show Midline — Toggle the range midpoint display
Target Projection
• Target 1/2/3 (x Range) — Multipliers for profit targets. Default values (1.0, 1.5, 2.0) follow classical ORB methodology.
Range Quality Analysis
• ATR Period — Lookback for ATR calculation (default: 14)
• Narrow Threshold — Ranges below this ATR multiple are classified as narrow (default: 0.5)
• Wide Threshold — Ranges above this ATR multiple are classified as wide (default: 1.2)
📈 How to Use This Indicator
1. Apply to an intraday chart (1-min to 5-min recommended)
2. Wait for the ORB session to complete — levels appear after the time window ends
3. Check Range Quality in the info panel
4. Watch for breakout confirmation — price must close beyond ORB High or Low
5. Use projected targets for trade management
💡 Practical Tips
• Narrow Range Days: Often produce cleaner breakout trades. Tight opening suggests indecision that typically resolves directionally.
• Wide Range Days: If range exceeds 1.5× ATR, consider whether the instrument has already made its daily move.
• Midline Usage: After breakout, the midline often acts as a pullback level for re-entry or confirmation.
📊 Why Range Quality Matters
Most ORB indicators plot static levels without context. A 100-point range on NIFTY might be significant on a quiet day but trivial on a volatile day.
By normalizing against ATR, this indicator answers: "Is today's opening range tight or loose relative to what this instrument normally does?"
This helps traders:
• Calibrate profit expectations
• Assess risk appropriately
• Avoid mechanical trading without market context
🔔 Alerts Available
• ORB Bullish Breakout
• ORB Bearish Breakout
• Target 1 Hit
• Target 2 Hit
⚠️ Notes
• Works on intraday timeframes only
• Best suited for liquid instruments with defined opening sessions
• Range Quality is contextual guidance, not a standalone signal
• Always use appropriate risk management
This indicator plots the Opening Range (OR) — the high and low established during a user-defined session window at market open — and provides context on the range's significance by comparing it to recent volatility.
After the opening range session completes, the indicator displays:
• ORB High and Low as horizontal reference levels
• Optional Midline (often acts as intraday support/resistance)
• Target projections at customizable multiples when breakout occurs
• Range Quality classification (Narrow / Normal / Wide)
🔬 How It Works
Step 1: Opening Range Capture
During the session window (default: 09:15–09:20 IST for Indian markets), the indicator tracks the highest high and lowest low. These become the day's Opening Range boundaries.
Step 2: Range Quality Analysis
This is where this indicator differs from standard ORB tools. It compares today's range to the instrument's Average True Range (ATR) and classifies it:
• NARROW — Range is less than 0.5× ATR
Interpretation: Price compression. The market opened in a tight range relative to recent volatility. Compression often precedes expansion — breakouts from narrow ranges can be more directional.
• NORMAL — Range is between 0.5× and 1.2× ATR
Interpretation: Typical opening behavior. Standard breakout expectations apply.
• WIDE — Range is greater than 1.2× ATR
Interpretation: The market opened with unusual volatility — possibly due to gaps, news events, or overnight developments. Wide ranges may indicate that much of the day's move has already occurred.
Step 3: Breakout Detection
A breakout is confirmed when price closes beyond the ORB High or Low (not just wicks through). The indicator tracks the first breakout direction each day.
Step 4: Target Projection
On confirmed breakout, targets are calculated using the ORB range as the measurement unit:
• Target 1 = Breakout Level ± (Range × 1.0)
• Target 2 = Breakout Level ± (Range × 1.5)
• Target 3 = Breakout Level ± (Range × 2.0)
⚙️ Settings Guide
Opening Range Settings
• ORB Session Window — Time window for capturing the range. Default: 0915-0920 (first 5 min for NSE/BSE) or 0915-10:00(first 45 mins for NSE/BSE. US Markets: 0930-0935 or 0930-0945.
• Show Midline — Toggle the range midpoint display
Target Projection
• Target 1/2/3 (x Range) — Multipliers for profit targets. Default values (1.0, 1.5, 2.0) follow classical ORB methodology.
Range Quality Analysis
• ATR Period — Lookback for ATR calculation (default: 14)
• Narrow Threshold — Ranges below this ATR multiple are classified as narrow (default: 0.5)
• Wide Threshold — Ranges above this ATR multiple are classified as wide (default: 1.2)
📈 How to Use This Indicator
1. Apply to an intraday chart (1-min to 5-min recommended)
2. Wait for the ORB session to complete — levels appear after the time window ends
3. Check Range Quality in the info panel
4. Watch for breakout confirmation — price must close beyond ORB High or Low
5. Use projected targets for trade management
💡 Practical Tips
• Narrow Range Days: Often produce cleaner breakout trades. Tight opening suggests indecision that typically resolves directionally.
• Wide Range Days: If range exceeds 1.5× ATR, consider whether the instrument has already made its daily move.
• Midline Usage: After breakout, the midline often acts as a pullback level for re-entry or confirmation.
📊 Why Range Quality Matters
Most ORB indicators plot static levels without context. A 100-point range on NIFTY might be significant on a quiet day but trivial on a volatile day.
By normalizing against ATR, this indicator answers: "Is today's opening range tight or loose relative to what this instrument normally does?"
This helps traders:
• Calibrate profit expectations
• Assess risk appropriately
• Avoid mechanical trading without market context
🔔 Alerts Available
• ORB Bullish Breakout
• ORB Bearish Breakout
• Target 1 Hit
• Target 2 Hit
⚠️ Notes
• Works on intraday timeframes only
• Best suited for liquid instruments with defined opening sessions
• Range Quality is contextual guidance, not a standalone signal
• Always use appropriate risk management
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.