OPEN-SOURCE SCRIPT
Aggiornato

X OR

186
Overview
Designed to plot hourly opening ranges (ORs) on an intraday chart. It primarily serves as a trading tool for assessing market direction and potential trading opportunities by analyzing price action relative to key OHLC (Open, High, Low, Close) levels within each hourly range.

The code provided is for each hour sessions from 2:00 AM to 3:00 PM for a complete session-based framework. In addition there is the RTH open range

Purpose
The core purpose of this indicator is to:
✅ Define each hourly range (based on the session’s opening bar) by recording the high and low of that range.
✅ Extend this range into the following bars for visual reference — serving as dynamic support and resistance zones.
✅ Monitor price action relative to each hourly OR, helping traders evaluate market direction and structure trades using concepts like:

Breakouts above/below the OR high/low.

Rejections or consolidations within the OR.

Continuation or reversal signals tied to each OR.

Key Features
The script marks the first bar of the session as the OR session start.
During this bar, it initializes:
Opening price
Session high
Session low

These levels form the initial range.

🔹 Dynamic Range Tracking

Throughout the one-minute OR session:

The highest and lowest prices are updated in real time, capturing intra-hour volatility.

A visual background box is drawn to highlight the OR range on the chart.

🔹 Range Extension

The script defines an extended session period after the initial OR (e.g., 2:00 AM-2:45 AM for the 2:00 AM session).

During this extension period:

The box persists on the chart, providing a contextual zone that traders can use as a dynamic support/resistance area.

🔹 Visual Representation

Transparent colored boxes highlight each session’s OR visually on the chart.

These boxes help traders easily identify whether price is trading:

Inside the OR

Breaking above the high (potential bullish continuation)

Breaking below the low (potential bearish continuation)

Application in Trading
🔍 Trading the Opening Range Breakout
Traders often use the OR high and low as breakout triggers. For example:

A price break above the OR high may signal bullish momentum.

A break below the OR low may signal bearish momentum.

⚖️ Support and Resistance
Even if breakouts fail, the OR can act as a pivot zone — offering areas for:

Stop placements

Target levels

Entry confirmations for fade trades or mean reversion strategies.

🕒 Session Awareness
By defining each hour’s OR individually (from 2:00 AM to 3:00 PM), traders can:

Analyze price behavior within each session.

Recognize when liquidity or volatility increases (e.g. around overlapping sessions like London open or New York open).

Summary
This Pine Script indicator provides a powerful framework for visualizing and trading hourly opening ranges. It enhances intraday analysis by:

Structuring price action within hourly boxes.

Highlighting key price levels relative to OHLC concepts.

Helping traders make more informed decisions by assessing price behavior around these critical ranges.

Note di rilascio
Added option for only the most current hour OR to be displayed versus designating specific hours.
Note di rilascio
added feature to extend 4H open ranges

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.