Opening Range Formation Trace Guide & Settings | SG Group
Skip to content
Japanese page

FreeOpen sourcePine Script v6

TradingView Free Indicator

Record the high and low formed during a configurable interval after the open, while preserving how the envelope expanded through time. At lock, classify the formation from width context, path efficiency, close location and expansion structure, then track accepted departure, re-entry and opposite-edge traverse in sequence.

Opening Range / Formation
Real chart published on TradingView: Opening Range Formation Trace - ORB & Initial Balance
Real chart image from the published TradingView page. The symbol, timeframe, settings and prices shown are a captured example, not current data or a trading result.
PurposeRecord opening-range formation and post-range behavior
Best forResearchers of ORB and Initial Balance formation
Primary outputRange box, cumulative trace, formation class and evidence card
Chart placementPrice-chart overlay
01 — Overview

Study how the opening range formed, not only its final box

A conventional opening-range plot chiefly preserves the high and low established after the open. This intraday research indicator also records two to eight cumulative envelopes, final-extreme order, close-path efficiency, early and late expansion, and width context versus prior completed ranges. It is not a trading signal.

What it visualizes

The developing or locked main box; high, low, midpoint and research-equilibrium rails; cumulative trace boxes; optional opening price; formation class; final high/low times; accepted-departure, re-entry and traverse annotations; and a fixed research card. Colors do not mean buy or sell.

How it works

Starting from the selected session open, lower-timeframe samples update high, low, open, close, HLC3 and volume. Path efficiency divides absolute open-to-final-close displacement by the first sample’s absolute close-minus-open move plus subsequent absolute close-to-close moves. Close location, expansion skew, late expansion share and early width share then enter a deterministic classification. Width percentile compares the current completed measure with prior history before appending it and remains unavailable with fewer than five prior values.

Trace slices are cumulative, not separate ranges

Each of the two to eight boxes carries the observed high and low through that point in clock time. The slices do not reset, so overlapping boxes are not independent evidence.

Eight classes follow fixed priority

Upper-led drive, lower-led drive, late upper, late lower, late two-sided, rotational, two-sided and mixed are tested in that order. The class describes the same completed observations; it does not predict the next move.

Evidence requires sequence

The first side with the configured consecutive departure samples is accepted. A later sample can re-enter across that side’s boundary, and only a still-later sample can reach the opposite edge. Reference projection also sets the evidence-tracking deadline.

02 — Install and start

Add it to TradingView

Add the public script to a standard intraday chart and first identify the default 15-minute main box, high/low rails, cumulative trace and research card. Change one display component at a time.

Opening Range Formation Trace – ORB & Initial Balance

Open the public Opening Range Formation Trace – ORB & Initial Balance page and add it to a TradingView chart. No SG Group account is required.

  1. Open the “Use on TradingView” link below.
  2. Select “Use on chart” on TradingView to add the script to your chart.
  3. Open the gear icon, then Settings → Inputs, and observe the default configuration first.
  4. Change one input at a time for the symbol and timeframe you are studying.
Observe the defaults firstChange one input at a timeVerify symbol, timeframe and feed

Prevent misreads when indicators overlap

Overlapping lines, bands, backgrounds or tables can be duplicate drawings of the same kind of information. Never treat visual overlap by itself as stronger evidence or signal agreement. Other opening-range, Initial Balance, session-shading, prior-high/low, VWAP, horizontal-level and fixed-panel tools can duplicate the same time window and rails. Cumulative trace boxes are not separate ranges. Overlap is not confluence or a stronger signal.

  • Hide other opening-range, Initial Balance and session-background studies while identifying this study’s main box and cumulative trace.
  • Equilibrium set to Midpoint exactly duplicates Midpoint; set to Opening price it can duplicate Session open. Disable one duplicate and distinguish prior-day or VWAP rails.
  • Enable formation labels, post-range annotations and the research card one at a time; move or hide other labels and fixed panels.
  • Do not count coincident boxes, rails or annotations as multiple signals. Use each indicator’s visibility control to identify the source.
03 — How to read it

A practical reading order

Do not conclude from final width alone. Separate the cumulative expansion path, open-to-close path efficiency, historical width percentile and sequenced post-range events.

Verify session, chart and duration

Choose US equities, Tokyo, London, CME equity RTH, Exchange Time or a custom IANA session. Standard intraday charts are supported. The default 15 minutes is an opening-range workflow; setting 60 minutes produces an Initial Balance-style observation, not a separate calculation engine.

Move from trace to locked metrics

Read upper, lower, two-sided or neutral cumulative expansion first. After lock, read width percentile (PCTL), path efficiency (EFF), late expansion (LATE) and the formation class. Percentile is not probability or win rate.

Follow A, R and X chronologically

Read accepted above/below (A↑ / A↓), re-entry (R), then opposite-edge traverse (X). Re-entry is a close back across the departed boundary; it does not require a close strictly inside both range edges.

Status and display terms

DEVELOPING / LOCKED / PARTIAL

The range is forming, finalized, or first observed after its configured start. PARTIAL disables classification, width history and evidence.

PCTL / EFF / LATE

Historical width percentile / open-to-close path efficiency / share of range added after halfway; not probability or win rate.

Upper / Lower / Both / Neutral

The cumulative envelope expanded upward only, downward only, both ways or neither in that slice.

Upper-led / Lower-led / Late / Rotational / Two-sided / Mixed

A compact view of the eight deterministic formation classes; it does not forecast direction.

A↑ / A↓

The first accepted departure above or below after the configured basis, buffer and consecutive confirmations.

R / X

Re-entry after the first accepted departure / a later reach of the opposite edge.

1m / 3m / 5m / 15m / coarse fallback

The effective lower-timeframe sample, or coarser chart-bar fallback when lower-timeframe data was unavailable.

04 — Settings reference

Settings reference

The labels below match the published script’s English Inputs panel. Defaults reflect the public source at the time of review and may change in a later TradingView update.

On small screens, each input is reformatted as a readable stacked card.

1. General

8 inputs
Input labelDefault / optionsWhat it controls and when to adjust it
LanguageEnglish; options: English | JapaneseSwitches chart labels, the research card and notices between English and Japanese. Input names in Settings remain bilingual in either mode.
Intrabar sampling1; options: 1 | 3 | 5 | 15Selects the minute intrabar used for formation, extreme chronology, range-end attribution and post-range events. Finer sampling improves resolution but remains limited by symbol history and the user's plan. A selection above the chart timeframe, including on second charts, falls back to the chart timeframe.
Historical renderingVisible chart (adaptive); options: Visible chart (adaptive) | Most recent sessionsChooses the historical drawing policy. Visible chart (adaptive) rebuilds sessions intersecting the viewport after scroll or zoom and keeps the newest intersecting sessions when over budget. Most recent sessions retains a traditional latest-first rolling window.
Maximum rendered sessions30; range: 1-40Caps retained session drawings without limiting the underlying calculations. Adaptive mode keeps the newest sessions intersecting the viewport; recent-session mode keeps the latest sessions.
Intrabar history request100000; options: 50000 | 100000 | 125000 | 200000Sets the lower-timeframe bars requested from TradingView. Larger requests can extend precise history but consume more resources; actual coverage remains plan- and symbol-dependent and is not guaranteed.
Confirmed chart-bar fallback beyond intrabar historytrueUses a confirmed historical chart bar as a coarse sample when intrabars are unavailable and the chart timeframe fits within the range duration. Coarse sessions are identified explicitly; realtime never uses this fallback and continues with completed intrabars only.
Width percentile context20; range: 5-100Sets the retained prior complete ranges used to rank the current width for the same configured session. A percentile requires at least five prior observations; the current value is appended only after ranking, and partial sessions are excluded.
Width comparison basisPercent of opening price; options: Percent of opening price | Raw priceChooses opening-price percentage or native price units for width percentiles. Percentage improves comparability across changing price levels; Raw price preserves native units. It does not change formation classification or the plotted range edges.

2. Opening range

7 inputs
Input labelDefault / optionsWhat it controls and when to adjust it
Session presetUS Equities 09:30 New York; options: US Equities 09:30 New York | Tokyo Cash 09:00 Tokyo | London Cash 08:00 London | CME Equity RTH 08:30 Chicago | Exchange Time 09:30 | CustomSelects the opening anchor and timezone: New York 09:30, Tokyo 09:00, London 08:00, Chicago 08:30, exchange timezone 09:30, or Custom. Only Custom uses the custom timezone, hour and minute below. Presets are reference anchors, not holiday or early-close calendars.
Custom IANA timezoneAmerica/New_YorkSets the IANA timezone used only when Session preset is Custom. Valid region names such as America/New_York apply the timezone's daylight-saving rules.
Custom open hour9; range: 0-23Sets the local opening hour, in 24-hour time, when the Custom preset is selected. It combines with the Minute setting.
Minute30; range: 0-59Sets the local opening minute for the Custom preset. It is paired with Custom open hour and is inactive for other presets.
Range duration (minutes)15; range: 1-240Sets the opening-range duration from the session start. A sample is included only when it starts inside the range and closes no later than the range end. The duration drives locking, classification checkpoints and trace timing.
Reference projection (minutes)390; range: 15-1440Sets how long range references and post-range evidence remain active from the session open. Evidence runs from the range end to this projection end. Values below the range duration are automatically raised to the range duration.
Active day mask23456Filters the local session-start day using TradingView day numbers: 1 Sunday through 7 Saturday, with 23456 meaning Monday-Friday. It is a numeric mask, not a market-holiday calendar.

3. Formation trace

11 inputs
Input labelDefault / optionsWhat it controls and when to adjust it
Show opening-range boxtrueShows the main box from session start to range end, updating with the developing high and low and adopting the formation color at lock. Disabling it does not stop calculations, classification, Data Window outputs or evidence.
Show cumulative formation tracetrueShows time-sliced cumulative high-low envelopes. Each box preserves the range reached up to that checkpoint rather than an independent mini-range. Turning it off affects drawings only, not classification checkpoints.
Trace time slices4; range: 2-8Sets the cumulative trace slice count and is active only when the trace is shown. Empty slices carry forward the last envelope at lock. The halfway and early classification checkpoints are independent of this visual count.
Show locked high and lowtrueShows developing, then locked, high and low boundary lines from the session start through the projection end. Hidden boundaries remain active in calculations and evidence.
Show midpointtrueShows the arithmetic midpoint between the range high and low, updating during formation and locking afterward. It always uses a dashed one-pixel line and ignores Reference line style.
Show session openfalseShows the first eligible sample's opening price from session start through the projection end. It is off by default and uses a fixed dotted one-pixel style.
Show research equilibriumtrueShows the selected equilibrium while it develops and through the projection after lock. This controls the chart line; the equilibrium remains a descriptive research value rather than a signal.
Equilibrium methodVolume-weighted mean; options: Volume-weighted mean | Mean price | Midpoint | Opening priceChooses the equilibrium method when its line is enabled. Volume-weighted mean weights sampled HLC3 by positive volume and falls back to the arithmetic HLC3 mean when volume is unusable; the other choices are arithmetic HLC3, range midpoint and session open.
Show completed formation labeltrueShows a label at range lock with formation, width percentile, path efficiency and late expansion. A session first seen after its start is labeled partial and has classification and evidence disabled. Hiding the label does not disable calculations.
Completed formation label detailCompact; options: Compact | DetailedChooses a compact single-line or visible multi-line formation label. Compact retains the full metrics, width, close location, skew, early share and resolution in its tooltip. It is active only when the completed label is shown.
Show final extreme timesfalseShows H and L labels at the sampled intervals where the final range high and low were first recorded. It applies only to complete sessions; chronology is limited by sampling resolution and cannot resolve order inside one sample.

4. Formation classification

7 inputs
Input labelDefault / optionsWhat it controls and when to adjust it
Drive: minimum path efficiency0.55; range: 0.05-1.00; step: 0.05Sets the minimum path efficiency for upper- or lower-led drive. Efficiency is absolute open-to-close displacement divided by sampled close-to-close path, capped at one. Drive also requires the close-edge and skew conditions and has first classification priority.
Drive: close-location edge0.72; range: 0.50-0.95; step: 0.01Sets the drive close-location threshold on a zero-at-low to one-at-high scale. Upper drive requires at least this value; lower drive requires no more than one minus this value.
Directional expansion skew0.18; range: 0.00-0.80; step: 0.02Sets the normalized difference between upper and lower expansion from the open. It is shared by drive direction, late-expansion direction and the neutral-skew test for two-sided formation. Classification priority is drive, late expansion, rotation, two-sided, then mixed.
Rotation: maximum efficiency0.32; range: 0.05-0.70; step: 0.01Sets the maximum efficiency for rotational formation, which also requires a close location from 0.35 to 0.65. Drive and late-expansion classes take priority when their conditions are met.
Late expansion: minimum share0.35; range: 0.05-0.90; step: 0.05Sets the minimum share of final width added after the halfway checkpoint. Qualifying sessions become late upper, late lower or late two-sided according to skew, before rotation or two-sided tests.
Early checkpoint (% of duration)25.0; range: 10.0-50.0; step: 5.0Sets the independent early checkpoint as a percentage of range duration. The early envelope uses samples starting before that time. It does not change visual trace slices, and coarse sampling reduces boundary precision.
Two-sided: maximum early-width share0.72; range: 0.10-1.00; step: 0.02Sets the maximum early-width share for two-sided formation. The absolute skew must also be below the directional skew threshold. This test follows drive, late expansion and rotation in classification priority.

5. Post-range evidence

7 inputs
Input labelDefault / optionsWhat it controls and when to adjust it
Track post-range evidencetrueTracks first accepted departure, re-entry, opposite-edge traverse, dwell, edge tests and maximum reach from range lock through the projection end. It is intentionally disabled for partial sessions and does not alter formation classification.
Departure evidence basisClose; options: Close | WickChooses close or wick for first accepted departure beyond the buffer. Re-entry always uses the close, and opposite-edge traverse always uses the wick regardless of this setting. It is active only while evidence tracking is enabled.
Departure buffer (% of range)0.05; range: 0.00-1.00; step: 0.01Sets the departure buffer as a fraction of completed range width. A value of 0.05 means 5%, not 0.05%. Evidence must exceed high plus buffer or low minus buffer; larger values are stricter. It is active only while evidence tracking is enabled.
Consecutive evidence samples2; range: 1-10Sets the consecutive same-side samples required for the first accepted departure. Opposite, inside, or simultaneous above-and-below evidence resets the runs. Sampling resolution therefore changes the confirmation interval. It is active only while evidence tracking is enabled.
Edge-test band (% of range)0.02; range: 0.00-0.25; step: 0.01Sets the half-width of the edge-test band as a fraction of range width. A sample tests an edge when its high-low span intersects the band, and only a new entry from outside increments the count. This is separate from departure acceptance and is active only while evidence tracking is enabled.
Show evidence event labelstrueShows chart annotations for acceptance, re-entry and opposite-edge traverse. It is active only while evidence tracking is enabled, and rendering also requires a complete eligible session. Hiding labels does not stop evidence calculations, the card, Data Window output or alerts.
Research cardCompact; options: Compact | Detailed | OffChooses Compact, Detailed or Off for the fixed research card. Detailed adds inside/above/below close-dwell percentages; Compact still shows edge tests and maximum reach. Adaptive mode follows the rightmost rendered session. Off can still leave required warning notices visible.

6. Visual design

15 inputs
Input labelDefault / optionsWhat it controls and when to adjust it
Upper expansionRGB 0, 229, 255 (#00E5FF)Sets the color for upper trace expansion, the range-high line, upper-led classes, accepted-above annotations and related panel accents. Color does not affect classification.
Lower expansionRGB 255, 45, 117 (#FF2D75)Sets the color for lower trace expansion, the range-low line, lower-led classes, accepted-below annotations and related panel accents. It does not affect calculations.
BalancedRGB 196, 214, 255 (#C4D6FF)Sets the visual color for developing or unchanged trace states, mixed and rotational formations, midpoint references and re-entry annotations. It is a display classification, not a trading-neutral guarantee.
Two-sided and transitionRGB 255, 215, 0 (#FFD700)Sets the color for two-sided trace expansion, two-sided classes, equilibrium, partial sessions, opposite-edge traverse and notices. It does not change logic.
Main box transparency88; range: 70-100Controls the main opening-range box background transparency. Higher values are lighter; borders and trace boxes use separate settings.
Trace transparency78; range: 55-100Controls cumulative trace-box transparency; higher values are lighter. It does not affect the main box.
Boundary line width2; range: 1-4Sets range high/low line width and the main-box border width. Midpoint, session-open and equilibrium lines remain fixed at width one.
Boundary line styleSolid; options: Solid | Dashed | DottedChooses Solid, Dashed or Dotted for the range high and low lines. It does not style the main-box border or equilibrium line.
Reference line styleDashed; options: Solid | Dashed | DottedChooses the style used by the equilibrium line and main-box border. Midpoint remains dashed and session open remains dotted.
Chart label sizeSmall; options: Tiny | Small | NormalSets chart-label size for formation, extreme-time and evidence annotations. Collision spacing is also scaled to 0.85 for Tiny and 1.25 for Normal. It does not resize the fixed panel.
Evidence annotation styleCompact markers; options: Compact markers | Full calloutsChooses A↑/A↓/R/X compact markers or full event callouts. Compact markers retain full descriptions, time, departure basis and confirmation count in tooltips. It is active when event labels are enabled; rendering also requires evidence tracking.
Visual research panel positionBottom right; options: Bottom right | Bottom left | Top right | Top leftChooses one of four corners for the fixed research panel. The default bottom-right layout includes transparent clearance from the price scale and time axis. Move it when another indicator uses the same corner.
Visual research panel scaleComfortable; options: Compact | Comfortable | LargeSelects Compact, Comfortable or Large typography for the fixed research panel only. It does not change chart annotations, drawings or calculations.
Annotation lane spacing (range multiple)0.25; range: 0.05-1.00; step: 0.05Sets the range-width multiple used as primary annotation spacing. Final spacing is the maximum of this value, the visible-span floor and six ticks, then adjusted for label size. It affects layout only.
Minimum lane spacing (% of visible price span)2.75; range: 0.25-10.0; step: 0.25Sets a zoom-aware minimum annotation separation as a percentage of the visible price span; 2.75 means 2.75%. Retained labels reflow when the viewport changes. It is not used in formation calculations.
05 — Alerts

Factual range-lock and post-range evidence alerts

Alerts report a locked range, accepted departure, re-entry or opposite-edge traverse that has already met the configured rules. They do not instruct direction, targets, stops or continuation.

  • Opening range locked fires when the configured interval finishes and the range is fixed. It can fire for a PARTIAL session even though classification and width percentile remain unavailable.
  • Accepted departure above and Accepted departure below report the first side to satisfy the configured basis, buffer and consecutive-sample requirement.
  • Range re-entry reports a later return across the departed boundary; Opposite-edge traverse reports a still-later reach of the other boundary.
06 — Limitations and responsible use

Not a buy/sell signal

This tool is for analysis and visualization. It is not investment advice, a trade recommendation, a forecast, or a promise of profit or accuracy. Results depend on inputs, symbol, timeframe, and data feed. You remain responsible for every trading decision.

Standard intraday charts only

Daily-and-higher and synthetic charts are disabled. When lower-timeframe samples are unavailable, the optional chart-bar fallback is coarser and can affect formation order and the width-history sample.

Partial starts are excluded

A session first observed after its configured start is PARTIAL. It receives no formation classification, width-history inclusion or post-range evidence tracking.

No automatic market calendar

Regional timezones follow local clock changes, but holidays, shortened days, exceptional closures and instrument-specific official opens are not detected. Verify the day mask and market schedule.

Visibility and calculation controls are not identical

A warning cell can remain when the main research card is off, and evidence annotation style does not fully govern whether evidence tracking is active. Review connected inputs together rather than assuming that hidden output stopped every calculation.

Important

Range width, percentile, efficiency, formation class, accepted departure, re-entry and traverse all derive from the same price series. Do not count them as independent confirmations or treat them as entries, exits, targets, stops, sizing, forecasts, probability, win rate or advice.

07 — FAQ

Frequently asked questions

Clarify ORB versus Initial Balance, cumulative trace, width percentile and sequenced post-range evidence.

Is Opening Range Formation Trace – ORB & Initial Balance free to use?

Yes. It is a free, open-source indicator published by SG Group on TradingView. Review TradingView’s terms and the conditions attached to the public script before reuse or redistribution.

Should I change the settings immediately?

Start with the published defaults and observe the drawings and state changes first. Then change one input at a time for the symbol, timeframe and data feed so you can identify what caused each visual change.

Can I display it with other indicators?

Yes, but similar lines, bands, backgrounds and tables can overlap and obscure their source. Isolate each indicator first and hide duplicate components. Visual overlap alone is not stronger evidence or signal agreement.

Does the display provide trade signals?

No. It is analysis and visualization context consistent with the public description. It does not provide entries, exits, targets, stops, price forecasts, or promises of profit, win rate or accuracy.

Are ORB and Initial Balance separate calculations?

No. The same opening-range engine uses a configurable duration. The default 15 minutes is an ORB workflow; 60 minutes provides an Initial Balance-style observation. It does not certify an exchange-specific definition or calendar.

Source basis and update policy

This guide is grounded in SG Group’s live catalogue, the script’s published TradingView description, and the user-facing inputs in its open source. Labels and defaults can change after a script update.