Opening Range¶
Indicators · Levels
High and low of the session's first N bars, held as levels for the rest of the session (opening-range breakout). Resets each session. Wire the levels into a comparison (close > OR high = breakout) or a price-mode TP/SL. NaN before the first session.
Opening Range captures the high and low of the session's first N bars and holds them as levels for the rest of the session. It's the backbone of the opening-range breakout (ORB) — one of the most-traded session strategies — giving you two lines to break, fade, or target.
How it works¶
From the bars input it watches the first bars bars after the session (session) opens, records the highest high and lowest low across them, and then holds those two levels flat until the session ends — resetting each new session. Before the first session completes its opening window the levels are NaN. The high/low each carry a configurable chart colour. Session timing uses the exchange timezone. Lookahead-free.
When to use it¶
Use it for breakout and fade setups anchored to the session open: go long when price closes above the opening-range high, short below the low, or fade a failed break back inside. The levels also make natural price-mode stop/target references. It shines on session-driven markets — index futures, stocks, and the FX session opens.
Example¶
London ORB: Opening Range with session = London, bars = 6 gives the first-6-bar high/low. Compare close to the high level with CrossesAbove for the long breakout, and wire the low level into the Tester as the protective stop.
Tips & gotchas¶
- Levels are NaN until the opening window completes each session — no breakout before the range is set.
barssets the range width — fewer bars = tighter, twitchier range; more = wider, slower.- Resets every session; boundaries are exchange-timezone aware.
- Pair with Bars Into Session to also restrict when you take the break.
Related blocks¶
Inputs¶
| Socket | Type | What to wire in |
|---|---|---|
| Bars | bars |
Price bars. |
Outputs¶
| Output | Type | Plots as | Description |
|---|---|---|---|
| OR ↑ | series |
Line | Opening-range high. |
| OR ↓ | series |
Line | Opening-range low. |
Parameters¶
| Parameter | Type | Default | What it does |
|---|---|---|---|
| Session | choice (asia, london, newyork, day) |
london |
|
| Range bars (N) | number · 1–500 | 6 |
How many bars from the session open define the range. |
| High color | colour | #ef5350 |
|
| Low color | colour | #66bb6a |
Reference auto-generated from the block catalog · category Indicators.