Skip to main content
AuctionFoundry
Menu

INDICATOR MANUAL

Opening range breakout indicatorOpening Range & Key Levels [AFD] · full manual · published to TradingView

Track five opening ranges from formation through extension alongside 17 optional session and higher-timeframe references.

216 documented settingsPublished on TradingView · Jul 25, 2026

Start here

What the indicator does, the questions it can help answer, and its fresh-install defaults.

The indicator can register four minute-based opening ranges and one seconds-based range. Duplicate durations collapse into one range. Each active range develops during its window and locks after the window closes.

A confirmed close beyond a locked boundary records a break. A return to the configured tolerance starts a retest; the first testing close resolves it as HELD or FAILED. Measured extensions are calculated from the frozen range width.

Seventeen optional overnight, day, pre-market, week, and month references plus an opening-gap level can be styled and labeled independently. Current-week and current-month extremes continue developing.

Fresh-install defaults8 documented defaults

Swipe or scroll horizontally to see every column.

Opening Range & Key Levels fresh-install defaults
AreaDefaultResult
Quick Start presetDefaultKeeps the 60-minute OR slot enabled and respects the enabled core key-level rows.
Opening rangesOR #4 · 60 minutesThe other minute slots and the seconds slot start off.
Core key levelsONH, ONL, PDO, PDH, PDL, PDCThese six rows start enabled; OPEN, pre-market, week, month, and GAP rows start off.
Range visualsBoxes and OR tags onMid lines, event labels, right-edge status tags, and all four extension drawings start off.
Key-level labelsPer level · 25-bar offsetEnabled rows show names and prices; lines start at the overnight boundary and can extend to labels.
Break and retestDaily ATR · 0.1Killzone, width, and volume filters start off.
Dashboard and weighted linesOffDashboard, intraday VWAP, overnight VWAP, and continuous VWMA are opt-in.
Dynamic alert textOnAny alert() function call can include the symbol, range or key-level identity, and price.

How it works

How the indicator turns chart data into the states and drawings you see.

Range registration

At the exchange-session boundary, the indicator registers each effective unique duration. Slots 1–4 use minutes; slot 5 uses seconds and requires a compatible seconds chart.

Forming and lock

High and low update during the opening window. When a confirmed bar reaches the window end, the range locks and its midpoint and 0.5×, 1.0×, 1.5×, and 2.0× extensions use the frozen width.

Break and retest

A wick does not establish a break. The first confirmed close beyond each side can arm a retest. Returning to the tolerance starts TESTING; the next deciding close records HELD or FAILED.

Event filters

The optional killzone consumes events that first occur inside its window rather than deferring them. The width filter leaves levels visible but suppresses events outside the selected daily-ATR range. Volume confirmation adds a separate condition.

Key-level lifecycle

Prior-day, week, and month values are snapshots from completed windows. ONH/ONL and PMH/PML need extended-hours history. CWH/CWL and CMoH/CMoL update when current-period extremes change.

Opening gap

A gap is admitted when today’s open differs from the prior close by at least the selected percentage. It can display as a line or zone, show fill progress, keep a filled record, and optionally freeze at fill.

VWAP, VWMA, and dashboard

Intraday VWAP resets at the session open, overnight VWAP at the prior session close, and VWMA does not reset. The optional dashboard reports range states, bias context, warnings, prices, gap progress, and broken key levels.

Output and state reference10 documented states

Swipe or scroll horizontally to see every column.

Opening Range & Key Levels outputs and states
Output or stateWhen it appearsMeaning
FORMINGOpening window activeThe range high and low are still developing.
LOCKED · INSIDEWindow closedThe frozen range has no recorded directional break.
BROKE ↑ / ↓Confirmed closePrice closed beyond the locked high or low.
RETESTPrice returns to toleranceThe broken boundary is being tested.
RETEST HELDFirst deciding close beyond levelThe close remained on the broken side of the boundary.
RETEST FAILEDFirst deciding close inside rangeThe close returned through the boundary into the range.
EXTENSIONTouch of a frozen projectionPrice reached an enabled multiple of the locked range width.
WIDTH FILTEREDLocked width outside filterThe range remains visible while its break and retest events are suppressed.
GAP FILLEDPrice returns to prior closeThe configured opening gap reached 100% fill.
DATA WARNINGIncompatible chart or historyA slot or reference lacks the timeframe, session, or loaded data it requires.

Settings

The 216 inputs include five OR rows, four extension rows, seventeen six-control key-level rows, gap controls, filters, dashboard options, three weighted references, and alert text. The repeated rows appear first as compact default matrices.

Opening range slots

25 mapped inputs

Swipe or scroll horizontally to see every column.

Opening range slots default matrix
RowEnabledWindowColorStyleWidth
OR #1OffToggle5 minWhole numberAquaColorSolidChoice / text2Whole number
OR #2OffToggle15 minWhole numberOrangeColorSolidChoice / text2Whole number
OR #3OffToggle30 minWhole numberGreenColorSolidChoice / text2Whole number
OR #4OnToggle60 minWhole numberFuchsiaColorSolidChoice / text2Whole number
Seconds OROffToggle30 secWhole numberWhiteColorSolidChoice / text2Whole number

Opening range extensions

20 mapped inputs

Swipe or scroll horizontally to see every column.

Opening range extensions default matrix
RowShownColorStyleWidthPrice tag
1.0×OffToggleGrayColorDashedChoice / text1Whole numberOnToggle
1.5×OffToggleGrayColorDashedChoice / text1Whole numberOnToggle
2.0×OffToggleGrayColorDashedChoice / text1Whole numberOnToggle
0.5×OffToggleGrayColorDashedChoice / text1Whole numberOnToggle

Seventeen key levels

102 mapped inputs

Swipe or scroll horizontally to see every column.

Seventeen key levels default matrix
RowShownColorStyleWidthLabelPrice
ONHOnTogglePurpleColorDottedChoice / text1Whole numberOnToggleOnToggle
ONLOnTogglePurpleColorDottedChoice / text1Whole numberOnToggleOnToggle
PDOOnToggleGrayColorDashedChoice / text1Whole numberOnToggleOnToggle
PDHOnToggleRedColorSolidChoice / text2Whole numberOnToggleOnToggle
PDLOnToggleLimeColorSolidChoice / text2Whole numberOnToggleOnToggle
PDCOnToggleGrayColorDashedChoice / text1Whole numberOnToggleOnToggle
OPENOffToggleYellowColorDashedChoice / text1Whole numberOnToggleOnToggle
PMHOffToggleTealColorDottedChoice / text1Whole numberOnToggleOnToggle
PMLOffToggleTealColorDottedChoice / text1Whole numberOnToggleOnToggle
PWHOffToggleBlueColorSolidChoice / text1Whole numberOnToggleOnToggle
PWLOffToggleBlueColorSolidChoice / text1Whole numberOnToggleOnToggle
CWHOffToggleBlueColorDashedChoice / text1Whole numberOnToggleOnToggle
CWLOffToggleBlueColorDashedChoice / text1Whole numberOnToggleOnToggle
PMOHOffToggleMaroonColorSolidChoice / text1Whole numberOnToggleOnToggle
PMOLOffToggleMaroonColorSolidChoice / text1Whole numberOnToggleOnToggle
CMOHOffToggleMaroonColorDashedChoice / text1Whole numberOnToggleOnToggle
CMOLOffToggleMaroonColorDashedChoice / text1Whole numberOnToggleOnToggle
⚡ Quick Start1 input

Swipe or scroll horizontally to see every column.

⚡ Quick Start settings and defaults
SettingControlDefaultChoices, limits & availability
PresetpresetChoice / textDefaultDefault · Minimal · Full · Custom
🎨 Opening Range Visuals11 inputs

Swipe or scroll horizontally to see every column.

🎨 Opening Range Visuals settings and defaults
SettingControlDefaultChoices, limits & availability
OR label modeor_label_modeChoice / textPer togglePer toggle · All on · All off
Show mid lineshow_midToggleOff—
Show range boxesshow_range_boxToggleOn—
Show event labels (break/retest)show_ev_labelsToggleOff—
Label textev_txt_colColorBlack—
Backgroundev_bg_colColorGray—
Match OR colorev_match_orToggleOn—
Show OR / extension tagsshow_or_tagsToggleOn—
Show price in OR tagsor_tag_priceToggleOn—
Show right-edge status tagshow_status_tagToggleOff—
OR lines stop ator_extendChoice / textSession endSession end · OR window end
🔑 Key Levels8 inputs

Swipe or scroll horizontally to see every column.

🔑 Key Levels settings and defaults
SettingControlDefaultChoices, limits & availability
Key Level Presetskl_presetChoice / textDefault acronymsDefault acronyms · Full words · Custom
Key level labelskl_lbl_modeChoice / textPer levelPer level · All on · All off
Key level extendkl_extendChoice / textSessionSession · Right edge
Extend lines leftkl_left_enToggleOn—
Label offset (bars)kl_lbl_offWhole number25Min 0 · Max 499
Extend lines to labelkl_line_to_lblToggleOn—
Show key level break labelskl_ev_enToggleOff—
Rename levelskl_renameChoice / textBlank—
⇅ Price GAP13 inputs

Swipe or scroll horizontally to see every column.

⇅ Price GAP settings and defaults
SettingControlDefaultChoices, limits & availability
GAPgap_enToggleOff—
Colorgap_colColorSilver—
Stylegap_styChoice / textDottedSolid · Dashed · Dotted
Widthgap_wWhole number1Min 1 · Max 4
Lblgap_lblToggleOn—
$gap_pxToggleOn—
Min gap %gap_min_pctDecimal0.1Min 0.0 · Step 0.05
Keep after fillgap_keepToggleOff—
Displaygap_modeChoice / textLine onlyLine only · Zone
Colorgap_box_colColorSilver—
Show Midpointgap_mid_enToggleOff—
Show fill %gap_fill_dynToggleOn—
After fillgap_afterChoice / textStop at fillStop at fill · Extend right
📊 Dashboard7 inputs

Swipe or scroll horizontally to see every column.

📊 Dashboard settings and defaults
SettingControlDefaultChoices, limits & availability
Show dashboardshow_dashToggleOff—
Positiondash_posChoice / textTop RightTop Right · Top Left · Bottom Right · Bottom Left
Text sizedash_sizeChoice / textSmallTiny · Small · Normal
Show bias rowdash_biasToggleOn—
Show broken key levelsdash_klToggleOn—
Show prices in dashboarddash_pricesToggleOn—
Status color modedash_color_modeChoice / textDirectionalDirectional · Neutral
⚡ Breakout & Retest14 inputs

Swipe or scroll horizontally to see every column.

⚡ Breakout & Retest settings and defaults
SettingControlDefaultChoices, limits & availability
Killzone filterkz_enToggleOff—
kz sesskz_sessSession1200-1330—
Highlight killzonekz_showToggleOff—
Colorkz_colColorRed · 88% transparent—
Labelkz_lbl_enToggleOn—
Retest toleranceretest_tol_typeChoice / textDaily ATRDaily ATR · Intraday ATR · Fixed Ticks
Valueretest_tol_valDecimal0.1Min 0.0 · Step 0.05
ATR lengthatr_lenWhole number14Min 1
OR width filterwidth_filt_enToggleOff—
min ×daily ATRwidth_min_atrDecimal0.1Min 0.0 · Step 0.05
max ×daily ATRwidth_max_atrDecimal1.0Min 0.05 · Step 0.1
Volume confirmationvol_conf_enToggleOff—
× 20-bar avgvol_conf_multDecimal1.5Min 0.5 · Step 0.25
Show volume tag on breakout labelsshow_vol_tagToggleOff—
📈 VWAP14 inputs

Swipe or scroll horizontally to see every column.

📈 VWAP settings and defaults
SettingControlDefaultChoices, limits & availability
Intraday VWAPvw1_enToggleOff—
Colorvw1_colColorBlue—
Stylevw1_styChoice / textSolidSolid · Dashed · Dotted
Widthvw1_wWhole number1Min 1 · Max 4
Overnight VWAPvw2_enToggleOff—
Colorvw2_colColorPurple—
Stylevw2_styChoice / textDottedSolid · Dashed · Dotted
Widthvw2_wWhole number1Min 1 · Max 4
Continuous VWMAvw3_enToggleOff—
Lengthvw3_lenWhole number20Min 1
Colorvw3_colColorGray—
Stylevw3_styChoice / textSolidSolid · Dashed · Dotted
Widthvw3_wWhole number1Min 1 · Max 4
Show VWAPs for last N daysvw_daysWhole number3Min 1 · Max 30
🔔 Alerts1 input

Swipe or scroll horizontally to see every column.

🔔 Alerts settings and defaults
SettingControlDefaultChoices, limits & availability
Dynamic alert textdyn_alertsToggleOn—

Alerts and limitations

What can notify you, what can change the output, and what the indicator cannot establish.

10 fixed alert conditions

OR Break Up

Confirmed close above an opening-range high.

OR Break Down

Confirmed close below an opening-range low.

OR Retest Held

An opening-range retest resolved HELD.

OR Retest Failed

An opening-range retest resolved FAILED.

OR Extension 1.0x Reached

Price touched a 1.0× opening-range extension.

OR Break Volume-Confirmed

An OR break met the configured volume threshold.

KL Break Up

Confirmed close crossed above a key level.

KL Break Down

Confirmed close crossed below a key level.

KL Retest Held

A key-level retest resolved HELD.

KL Retest Failed

A key-level retest resolved FAILED.

Limits to keep visible

  • This is a single-timeframe script. A chart interval larger than, or poorly aligned with, a short opening window can approximate its boundary.
  • The seconds slot needs a seconds chart at or below the selected duration; otherwise the dashboard reports a warning.
  • Session open, close, and timezone follow the symbol’s exchange context and the chart’s available session data.
  • ONH, ONL, PMH, and PML need extended-hours data. Prior week and month values need enough loaded history.
  • Current-week and current-month highs and lows are developing values, not completed-period snapshots.
  • Killzone, width, and volume filters change which events are recorded; they do not change the already drawn locked range itself.
  • The 1.0× extension alert is touch-based, while range and key-level breaks are confirmed-close events.
  • Levels and dashboard terms describe configured conditions. They are not trade recommendations or risk controls.

Troubleshooting

Start with what you see on the chart. Each answer explains the likely cause and the first setting, timeframe, or data condition to check.

Why do two enabled opening ranges show as one?

The two slots resolve to the same duration, so the script combines them instead of drawing duplicate ranges. Compare the effective duration in each enabled slot and change one if you want two separate windows.

Why did price wick outside the range without recording a Break?

A Break needs a completed candle to close beyond the range or key level. The wick shows an intrabar test, not a confirmed Break. Wait for the candle to close before deciding that the event is missing.

Why is the seconds opening range showing a warning?

The chart interval is too large to build that seconds window accurately. Use a seconds chart at or below the selected range duration, or turn off the seconds slot when working on a higher interval.

Why are overnight or pre-market levels blank?

Those levels need extended-hours bars. Turn on extended-hours data for the chart and load enough history to include the overnight or pre-market window. If the feed does not provide those bars, the levels will remain blank.

Why can I see the range when it says WIDTH FILTERED?

The range still formed and locked, but its width fell outside your event filter. The drawing remains for context while Break and Retest events are suppressed. Adjust or disable the width filter if you want that range to generate events.

Why did an event inside the killzone never appear later?

The killzone filter rejects an event that first happens inside its blocked window; it does not save the event for later. Change or disable the killzone if you want those events recorded.

Risk disclosure

Auction Foundry LLC provides educational charting tools and general market commentary only. This is not investment, financial, legal or tax advice, and nothing here is a recommendation, offer or solicitation to buy or sell any instrument. Auction Foundry is not registered with the SEC as an investment adviser, nor with the CFTC as a commodity trading advisor, and is not an NFA member.

Trading involves risk, including loss of principal. Losses can exceed a modeled stop and, for leveraged or margin products, can exceed the amount initially deposited or invested. Indicators can be wrong, delayed or unsuitable for your circumstances, and past or hypothetical results do not predict future results. Free access does not change any of this. Consider your objectives and consult a licensed professional before acting. Using these tools does not create an advisory or brokerage relationship.

Auction Foundry LLC is an independent publisher and is not affiliated with, endorsed by, or sponsored by TradingView, Inc. “TradingView” is a trademark of TradingView, Inc., used here only to identify the platform our scripts are published on. Scripts are published to TradingView as a community author on the same terms as any other author.

Read the full Risk Disclosure for the dated, versioned document this summarizes.