OPEN-SOURCE SCRIPT
تم تحديثه

ORB Range Indicator with Fibonacci Targets

5 557

This script plots the Opening Range (ORB) high and low based on a configurable time window (5–45 minutes from the U.S. session open at 9:30 AM EST).
Once the ORB window closes, the indicator draws horizontal lines marking:

ORB High and Low

The size of the range in price and %

Fibonacci-based price targets above and below the range (0.382, 0.618, 1.000, 1.618, 2.000)

You can control:

Which Fibonacci levels to display

Whether to show long targets, short targets, or both

All drawings are automatically cleared at the start of each trading day.

Ideal for breakout traders using ORB and Fibonacci extensions for target planning.

ملاحظات الأخبار

ORB Range Indicator with Fibonacci Targets

This script plots the Opening Range (ORB) high and low based on a configurable time window (5–45 minutes from the U.S. session open at 9:30 AM EST).
Once the ORB window closes, the indicator draws horizontal lines marking:

ORB High and Low

The size of the range in price and %

Fibonacci-based price targets above and below the range (0.382, 0.618, 1.000, 1.618, 2.000)

You can control:

Which Fibonacci levels to display

Whether to show long targets, short targets, or both

All drawings are automatically cleared at the start of each trading day.

Ideal for breakout traders using ORB and Fibonacci extensions for target planning.

ملاحظات الأخبار
A recent fix was added to improve stability — it ensures that the indicator works correctly even on low-volume or quiet days by safely handling situations where no breakout lines or labels are drawn. This prevents potential runtime errors that occurred in some edge cases.

If you run into any issues or bugs, feel free to leave a comment and I’ll take a look.

ملاحظات الأخبار
Added Session Selector:
A new dropdown input named "Trading Session" (`session_choice`) was added, allowing you to select from "New York", "London", "Tokyo", and "Frankfurt".

Dynamic Time Logic:
The static time settings were replaced with a `switch` statement. This dynamically assigns the correct `session_tz` (timezone), `start_hour`, and `start_minute` based on the session you select.

Updated Reset Logic:
The script will now automatically clear and redraw the ORB lines and targets if you change the selected "Trading Session", in addition to resetting on a new day or when the range duration is changed.
ملاحظات الأخبار
Changelog

* New Feature: Added Max Distance Tracking logic.
* Mechanism: The script now continuously tracks the highest price (for longs) and lowest price (for shorts) achieved after the breakout level is breached.
* Visuals: Added dynamic labels that update in real-time:
* Green Label: Shows the maximum points gained above the ORB High.
* Red Label: Shows the maximum points gained below the ORB Low.


* Reset: Variables and labels automatically reset at the start of a new session or day.

Quick Usage

1. Open the indicator settings.
2. Enable the checkbox: Show Max Distance from Breakout.
3. Once a breakout occurs, look for the Max label at the extreme price pivot (peak or valley) to see the maximum potential profit generated by the move so far.
ملاحظات الأخبار
Changelog
New Feature: Added Max Distance Tracking logic with percentage calculation.

Mechanism: The script tracks the highest price (for longs) and lowest price (for shorts) achieved post-breakout.

Visuals: Added dynamic labels showing both price difference and percentage gain (e.g., Max: +10.5 (0.5%)).

Reset: Distance variables reset automatically at the start of a new session.

Quick Usage
Open indicator settings.

Ensure Show Max Distance from Breakout is enabled.

Watch for the Max label appearing at the extreme high or low after a breakout occurs to see the trade's potential magnitude in both points and percentage.
ملاحظات الأخبار
Changelog
New Feature: Added Max Distance Tracking logic with percentage calculation.

Mechanism: The script tracks the highest price (for longs) and lowest price (for shorts) achieved post-breakout.

Visuals: Added dynamic labels showing both price difference and percentage gain (e.g., Max: +10.5 (0.5%)).

Reset: Distance variables reset automatically at the start of a new session.

Quick Usage
Open indicator settings.

Ensure Show Max Distance from Breakout is enabled.

Watch for the Max label appearing at the extreme high or low after a breakout occurs to see the trade's potential magnitude in both points and percentage.
ملاحظات الأخبار
Update: Enhanced Visuals & Custom Fibs
New Features:

Custom Fibonacci Levels: Added 2 new input fields to define your own specific target levels (e.g., 0.236 or 0.786).

Smart Label Positioning: The specific Range labels (High/Low) are now moved inward (default 180 bars) to clear up space, while Target labels remain extended to the far right.

Layout Control: Added a new settings group, "Line & Label Settings", giving you full control over how far the lines extend and where the text labels sit on your chart.

Extended Visibility: Target lines now extend further by default (300 bars) to cover the full trading day.
ملاحظات الأخبار
Custom Fibonacci Levels
Smart Label Positioning
Layout Control
Extended Visibility
ملاحظات الأخبار
Update: Max Distance, Alerts & Visuals
Max Distance Tracking: Added a dynamic label that tracks the maximum potential profit (in points and %) achieved after a breakout.

Visual Breakout Signals: Added triangle markers that appear exactly on the breakout line (Long/Short) to visually confirm the signal.

Standard Alerts: Integrated alertcondition for easy setup of "ORB Long Breakout" and "ORB Short Breakout" via the Create Alert menu.

Custom Fibonacci: Added inputs for 2 user-defined target levels.

Layout Control: Separated settings for line length and label positioning to keep the chart clean.
ملاحظات الأخبار
Update: Added Cumulative Breakout Volume

New Feature: Added real-time tracking of cumulative volume from session start until the breakout moment.
Visuals: Added a "Total Breakout Vol" label at the breakout point in a distinct Fuchsia color.
Alerts: Updated alert messages to include the total volume data.
Optimization: Refactored code for full Pine Script v6 compatibility and fixed syntax issues.
ملاحظات الأخبار
Show Total Breakout Volume Label
ملاحظات الأخبار
Added ORB Volume
ملاحظات الأخبار
Description of the update: ORB and Pre-Market integration

This update merges pre-market range tracking into your ORB script. It identifies high and low price levels between 04:00 and 09:30 New York time. The lines are programmed to stop at the start of the regular session to avoid visual clutter. A dedicated volume tracker summarizes all trades during the pre-market period.
ملاحظات الأخبار
The update now includes the pre-market range calculation in both price points and percentage. This information is displayed on the pre-market label alongside the volume data. This allows for a quick comparison between the pre-market volatility and the subsequent opening range.
ملاحظات الأخبار
The indicator integrates overnight range tracking with the ORB scanner. It captures the high, low, and total volume starting from the previous day's close at 16:00 until the current day's open at 09:30. These levels are plotted as static lines that appear only during regular hours to provide context without cluttering the current after-hours session. The overnight label displays the total volume and the price range percentage.
ملاحظات الأخبار
The Max Distance tracking (peak after breakout) has been fully restored to its original logic. The Extended Hours (Overnight) range is now collected from 16:00 to 09:30 and plotted as static lines only at the market open, preventing them from appearing in the current day's after-hours session.
ملاحظات الأخبار
Full restoration of the original ORB script features, including target labels, max distance tracking, and adjustable line lengths. The Extended Hours logic has been corrected to capture data from 16:00 to 09:30 without syntax errors. Indentation has been fixed to comply with Pine Script v6 standards, and the "then" keyword has been completely removed.
ملاحظات الأخبار
bugs fix
ملاحظات الأخبار
Gap calculation added
ملاحظات الأخبار
bug fixes

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.