Opening Range Breakout
Opening-range highs and lows for 1, 2, 5, 10, 15, 30 and 60 minutes after the 09:30 New York open.
- ORB
- Built into Spectral
- Updates every tick
- opening range
- breakout
- orb
- session
- intraday
MIT-0: free to use, change and share, no attribution needed. What you build from it is yours.
Already in Spectral: add it from the Indicators toolbox. The file here is the same indicator written as a custom indicator, to change or learn from. Installed, it appears next to the built-in one, marked Custom.

Overview
Opening Range Breakout tracks one or more opening ranges of the latest New York regular session, starting at 09:30. Each enabled duration has its own high and low level, drawn once that range has completed.
How to read it
Watch how price behaves at a boundary: a rejection, a sustained acceptance or a failed breakout gives more information than a single print through a line. Several ranges together show short and longer opening context at once.
Settings and limitations
Turn on any combination of the 1, 2, 5 (default), 10, 15, 30 and 60 minute ranges; every level has its own color setting. Use a bar size that divides the durations you enable, for example 1 minute for all of them or 5 minutes for 5 and longer.
Notes
Computes the same levels as the built-in ORB in Spectral on a 1-minute chart. The built-in reads 1-minute bars on every bar size, which a custom indicator cannot do in schema v1. ORB is a reference framework, not an automatic breakout strategy.
Settings
Each setting appears in the indicator's settings panel in Spectral, next to a color setting for every output.
| Setting | Type | Default | Range or options | What it does |
|---|---|---|---|---|
| 1 minute range | On / off | Off | — | Draw the high and low of the first minute. |
| 2 minute range | On / off | Off | — | Draw the high and low of the first 2 minutes. |
| 5 minute range | On / off | On | — | Draw the high and low of the first 5 minutes. |
| 10 minute range | On / off | Off | — | Draw the high and low of the first 10 minutes. |
| 15 minute range | On / off | Off | — | Draw the high and low of the first 15 minutes. |
| 30 minute range | On / off | Off | — | Draw the high and low of the first 30 minutes. |
| 60 minute range | On / off | Off | — | Draw the high and low of the first 60 minutes. |
What it draws
Levels
- ORB 1m Highdashed · 1 px · value on the axis
#8AA9C3 - ORB 1m Lowdashed · 1 px · value on the axis
#8AA9C3 - ORB 2m Highdashed · 1 px · value on the axis
#B7A1C8 - ORB 2m Lowdashed · 1 px · value on the axis
#B7A1C8 - ORB 5m Highdashed · 1 px · value on the axis
#9AA5B1 - ORB 5m Lowdashed · 1 px · value on the axis
#9AA5B1 - ORB 10m Highdashed · 1 px · value on the axis
#6FAF8A - ORB 10m Lowdashed · 1 px · value on the axis
#6FAF8A - ORB 15m Highdashed · 1 px · value on the axis
#C4A46A - ORB 15m Lowdashed · 1 px · value on the axis
#C4A46A - ORB 30m Highdashed · 1 px · value on the axis
#C98282 - ORB 30m Lowdashed · 1 px · value on the axis
#C98282 - ORB 60m Highdashed · 1 px · value on the axis
#B8C1CC - ORB 60m Lowdashed · 1 px · value on the axis
#B8C1CC
Source
Save it as orb.js and add it with Indicators → Custom indicators → Add file…. The format is explained in the custom indicators guide.
// Copyright (c) 2026 Spectral
// SPDX-License-Identifier: MIT-0
// Free to use, copy, modify and share: https://spectral.trade/docs/custom-indicators/LICENSE.txt
/** @type {import('./spectral-indicator').IndicatorV1} */
export default {
schemaVersion: 1,
id: 'orb',
name: 'Opening Range Breakout',
shortName: 'ORB',
version: '1.0.0',
author: 'Spectral',
description: 'Opening-range highs and lows for 1, 2, 5, 10, 15, 30 and 60 minutes after the 09:30 New York open.',
pane: 'price',
live: { lookback: 0 },
inputs: {
show1m: { type: 'boolean', label: '1 minute range', default: false, description: 'Draw the high and low of the first minute.' },
show2m: { type: 'boolean', label: '2 minute range', default: false, description: 'Draw the high and low of the first 2 minutes.' },
show5m: { type: 'boolean', label: '5 minute range', default: true, description: 'Draw the high and low of the first 5 minutes.' },
show10m: { type: 'boolean', label: '10 minute range', default: false, description: 'Draw the high and low of the first 10 minutes.' },
show15m: { type: 'boolean', label: '15 minute range', default: false, description: 'Draw the high and low of the first 15 minutes.' },
show30m: { type: 'boolean', label: '30 minute range', default: false, description: 'Draw the high and low of the first 30 minutes.' },
show60m: { type: 'boolean', label: '60 minute range', default: false, description: 'Draw the high and low of the first 60 minutes.' },
},
levels: {
orb1High: { label: 'ORB 1m High', color: '#8AA9C3', lineStyle: 'dashed', showValue: true },
orb1Low: { label: 'ORB 1m Low', color: '#8AA9C3', lineStyle: 'dashed', showValue: true },
orb2High: { label: 'ORB 2m High', color: '#B7A1C8', lineStyle: 'dashed', showValue: true },
orb2Low: { label: 'ORB 2m Low', color: '#B7A1C8', lineStyle: 'dashed', showValue: true },
orb5High: { label: 'ORB 5m High', color: '#9AA5B1', lineStyle: 'dashed', showValue: true },
orb5Low: { label: 'ORB 5m Low', color: '#9AA5B1', lineStyle: 'dashed', showValue: true },
orb10High: { label: 'ORB 10m High', color: '#6FAF8A', lineStyle: 'dashed', showValue: true },
orb10Low: { label: 'ORB 10m Low', color: '#6FAF8A', lineStyle: 'dashed', showValue: true },
orb15High: { label: 'ORB 15m High', color: '#C4A46A', lineStyle: 'dashed', showValue: true },
orb15Low: { label: 'ORB 15m Low', color: '#C4A46A', lineStyle: 'dashed', showValue: true },
orb30High: { label: 'ORB 30m High', color: '#C98282', lineStyle: 'dashed', showValue: true },
orb30Low: { label: 'ORB 30m Low', color: '#C98282', lineStyle: 'dashed', showValue: true },
orb60High: { label: 'ORB 60m High', color: '#B8C1CC', lineStyle: 'dashed', showValue: true },
orb60Low: { label: 'ORB 60m Low', color: '#B8C1CC', lineStyle: 'dashed', showValue: true },
},
docs: {
overview: 'Opening Range Breakout tracks one or more opening ranges of the latest New York regular session, starting at 09:30. Each enabled duration has its own high and low level, drawn once that range has completed.',
howToRead: 'Watch how price behaves at a boundary: a rejection, a sustained acceptance or a failed breakout gives more information than a single print through a line. Several ranges together show short and longer opening context at once.',
settings: 'Turn on any combination of the 1, 2, 5 (default), 10, 15, 30 and 60 minute ranges; every level has its own color setting. Use a bar size that divides the durations you enable, for example 1 minute for all of them or 5 minutes for 5 and longer.',
notes: 'Computes the same levels as the built-in ORB in Spectral on a 1-minute chart. The built-in reads 1-minute bars on every bar size, which a custom indicator cannot do in schema v1. ORB is a reference framework, not an automatic breakout strategy.',
},
calculate(ctx) {
const { bars, inputs, ta, time } = ctx;
const OPEN = 9 * 60 + 30;
const ranges = [
{ minutes: 1, enabled: inputs.show1m },
{ minutes: 2, enabled: inputs.show2m },
{ minutes: 5, enabled: inputs.show5m },
{ minutes: 10, enabled: inputs.show10m },
{ minutes: 15, enabled: inputs.show15m },
{ minutes: 30, enabled: inputs.show30m },
{ minutes: 60, enabled: inputs.show60m },
];
const levels = {};
for (const range of ranges) {
levels[`orb${range.minutes}High`] = null;
levels[`orb${range.minutes}Low`] = null;
}
if (bars.length === 0) return { levels };
// Every opening range of the day carries from bar to bar through ta.scan ([high, low] per range, null before
// its first bar); a new New York date starts them again.
const none = ranges.map(() => null);
const states = ta.scan(bars, { date: '', sawOpen: false, extremes: none }, (state, bar) => {
const info = time.ny(bar);
const fresh = info.dateKey !== state.date;
const extremes = fresh ? none : state.extremes;
// A bar after every range on the same day changes nothing: the state itself, which ta.scan keeps without copying.
if (!fresh && state.sawOpen && info.minutes >= OPEN + ranges[ranges.length - 1].minutes) return state;
if (info.minutes < OPEN) return { date: info.dateKey, sawOpen: fresh ? false : state.sawOpen, extremes };
return {
date: info.dateKey,
sawOpen: true,
extremes: ranges.map((range, position) => {
const extreme = extremes[position];
if (info.minutes >= OPEN + range.minutes) return extreme;
return extreme === null ? [bar.high, bar.low] : [Math.max(extreme[0], bar.high), Math.min(extreme[1], bar.low)];
}),
};
});
// A range is drawn once it is over on the latest day.
const latest = time.ny(bars[bars.length - 1]);
const active = ranges.filter((range) => range.enabled && latest.minutes >= OPEN + range.minutes);
const last = states[states.length - 1];
if (active.length === 0 || !last.sawOpen) return { levels };
for (const range of active) {
const extreme = last.extremes[ranges.indexOf(range)];
levels[`orb${range.minutes}High`] = extreme === null ? null : extreme[0];
levels[`orb${range.minutes}Low`] = extreme === null ? null : extreme[1];
}
return { levels };
},
};Adapt it with an LLM
Paste this into your assistant and replace the second-to-last line with the change you want.
Start from this Spectral custom indicator: https://spectral.trade/indicators/orb.js Format reference: https://spectral.trade/docs/custom-indicators.llm.md Keep the file format and every rule of the reference; give the result a new id, name, shortName and version, and update docs and input descriptions to match. Keep its live updates exact and fast (section "Fast live updates" of the reference): carry values from bar to bar only through ctx.ta, and raise live.lookback if the change reads further back; Spectral rejects a file whose live updates differ from a full recalculation or are too slow. Change I want: <describe the change> Answer with the complete file in one code block, ready to save as <id>.js.


