Global Cash Market Open Close Handoff Sequence

561
Global Cash Market Open Close Handoff Sequence is a schedule-state transition study for configurable cash-market reference hours.

The vertical line is only the presentation layer. At each unique boundary timestamp, the script generates and consolidates scheduled OPEN, BREAK, RESUME, and CLOSE events, evaluates the configured active-market state immediately before and after that timestamp, and classifies how the tracked market schedule changes.

Instead of displaying every market event as an unrelated line, the script treats the enabled markets as one chronological system. It shows how that system activates, gains overlap, changes market identity, releases overlap, and deactivates through the trading day.

The classification engine uses schedule state only. It does not use price direction, session highs or lows, volume, volatility, external symbols, higher-timeframe data, or future price assumptions.

Core transition model

Every consolidated boundary is assigned one of the following descriptive roles:

- ACTIVATE: No configured market is active before the boundary, and one or more markets are active after it.

- OVERLAP +: The number of configured active markets increases across the boundary.

- HANDOFF: The active-market count remains unchanged, but the composition of the active-market set changes.

- OVERLAP -: The number of configured active markets decreases, while at least one tracked market remains active.

- DEACTIVATE: One or more configured markets are active before the boundary, and none are active after it.

- INTERNAL: A scheduled boundary occurs, but the configured active-market set does not materially change.

HANDOFF is intentionally separate from a normal open, close, or overlap count.

For example, if one market closes while another market opens or resumes at the same timestamp, the number of active markets can remain unchanged even though the identity of the active markets changes. The script detects that composition change and classifies it as a HANDOFF rather than treating the two events as unrelated markers.

Simultaneous-event consolidation

Events that share the same absolute timestamp are merged before they are drawn.

If two or more configured markets open, close, break, or resume at the same time, the script creates one structural boundary instead of stacking multiple vertical lines and overlapping labels at the same chart position.

The merged label lists the events that occurred at that timestamp. The transition role is then calculated from the complete configured state before and after the consolidated boundary.

This makes simultaneous events readable while preserving their individual market identities.

Split-session handling

Each market can contain one or two independently editable trading segments.

When two enabled segments are separated, the script models the market day as:

OPEN
BREAK
RESUME
CLOSE

When the two segments touch or overlap, they are automatically treated as one continuous interval:

OPEN
CLOSE

This allows split cash-market schedules, such as morning and afternoon continuous-trading periods, to be represented without creating a false break when the configured intervals are actually continuous.

Default reference schedules

The default configuration contains six editable cash-market reference schedules:

- Sydney Cash
10:00-16:00
Australia/Sydney

- Tokyo Cash
09:00-11:30 and 12:30-15:30
Asia/Tokyo

- Hong Kong Cash
09:30-12:00 and 13:00-16:00
Asia/Hong_Kong

- Xetra Main Cash
09:00-17:30
Europe/Berlin

- London Cash
08:00-16:30
Europe/London

- New York Cash
09:30-16:00
America/New_York

The default weekday setting is Monday through Friday.

Every market can be enabled or disabled independently. The displayed name, short code, IANA time zone, weekdays, first segment, optional second segment, and color are all editable.

The defaults are reference schedules rather than locked assumptions. Users can adjust them for another market, venue, research convention, or historical schedule.

Time-zone and DST handling

Each market uses its own IANA time-zone identifier.

This allows regional daylight-saving changes to be applied independently. Sydney, London, Xetra, and New York do not rely on one fixed UTC offset, and Asian markets can remain on their configured local schedules.

The chart time zone does not define the market calculations. Market boundaries are generated from each market's configured IANA time zone and placed on the chart using absolute timestamps.

The Boundary Strip has a separate readout time-zone input. Changing that input changes the displayed date and time in the panel without changing the underlying boundary timestamps.

Historical research modes

Visible range is the default research mode.

In this mode, the script rebuilds its boundary sequence around the section of the chart currently being studied. Panning or zooming the chart can therefore change the processed time window and the subset of boundaries retained for display.

The right visible bar acts as the effective anchor. This makes it possible to move to a historical period and inspect the market schedule, active-market state, previous boundary, next boundary, and handoff sequence for that period rather than only for the latest bar.

A configurable visible-span cap prevents an extremely wide chart range from creating an unnecessarily large calculation window. If the displayed range exceeds the cap, the script processes the most recent permitted portion ending at the right visible bar.

Recent days is available as an alternative mode.

Its anchor can follow:

- The right visible bar
- The latest chart bar
- The real clock

This allows the same engine to support historical inspection, dataset-relative inspection, or a clock-relative schedule view.

Future schedule projection

The script can project recurring configured boundaries beyond the effective anchor.

These projected objects represent repetitions of the selected reference schedule. They are not price forecasts, volatility forecasts, liquidity predictions, or claims that an exchange will operate normally on the projected date.

Future projection can be disabled or limited through the settings. The immediate next boundary can be emphasized with a separate color and width so that it remains identifiable without turning every future boundary into a dominant chart object.

Adaptive spread

A complete multi-market schedule can generate many boundaries across a long visible range. Drawing all of them at once would reduce the readability of both the indicator and the underlying price chart.

Adaptive spread is therefore the default line-retention mode.

When the generated boundary count exceeds the selected visual budget, Adaptive spread distributes a capped subset of already generated and classified boundaries across the displayed research span. It attempts to preserve structural variety across the global market sequence and retains the immediate next boundary when one is available.

Adaptive spread changes presentation only.

It does not change:

- The configured market schedules
- The generated event timestamps
- Simultaneous-event consolidation
- The active-market state
- The transition classification
- The Last and Next calculations

The default visible line budget is seven, providing a sparse publication-ready view while leaving price visible.

Users who need a denser local study can increase the line and label budgets or select Nearest anchor. Nearest anchor favors boundaries closest to the effective anchor rather than distributing them across the complete displayed span.

Boundary lines and labels

Lines are drawn behind the chart so that candles and price remain visually dominant.

Users can control:

- Historical and projected boundaries
- Visible line budget
- Line width
- Historical and future transparency
- Directional or uniform line styles
- Market-identity or transition-role colors
- Next-boundary emphasis
- Label visibility
- Label content
- Label placement
- Label lanes
- Minimum spacing
- Maximum label count
- Text size
- Text emphasis
- Label transparency
- Native local time in tooltips

Directional line style distinguishes single-event boundary types:

- OPEN and RESUME use a solid line
- BREAK uses a dotted line
- CLOSE uses a dashed line
- Consolidated multi-event timestamps use a solid structural line

Transition-role color mode emphasizes the change in the configured active-market state.

Market-identity color mode instead preserves the market color associated with the event. Consolidated timestamps can use a dedicated simultaneous-event color.

Labels can show:

- Transition role and event list
- Event list only
- Transition role only

Lane allocation and minimum time spacing reduce label collisions without moving the actual boundary timestamp.

Boundary Strip

The fixed Boundary Strip summarizes the effective research state.

It displays:

- ANCHOR: The timestamp at which the current state is evaluated

- ACTIVE: The configured markets active at the anchor and their count

- LAST: The most recent generated boundary at or before the anchor

- NEXT: The first generated boundary after the anchor

- COUNTDOWN: The time remaining from the anchor to the next boundary

- VIEW: The active schedule scope, retention mode, and any display-cap status

The Active row refers to the effective anchor shown in the panel. Under the default configuration, this is the right visible bar and is not necessarily the current real-world time.

The panel defaults to the lower-left area and includes adjustable bottom clearance to avoid permanent chart furniture. It can also be moved to another left or right chart position, and its text size and emphasis can be changed.

Suggested use

1. Add the indicator to an intraday chart.

2. Begin with the default settings so that the published chart and the user's first view remain consistent.

3. Read the transition role first to understand whether the configured market system is activating, gaining overlap, handing off, releasing overlap, or deactivating.

4. Read the event line below the role to identify the market-specific OPEN, BREAK, RESUME, or CLOSE events that produced that transition.

5. Use the Boundary Strip to confirm the effective anchor, active markets, previous boundary, next boundary, and remaining time.

6. Pan to an earlier period when studying historical market transitions. Visible range mode will rebuild around the displayed chart section.

7. Increase the visual budgets or switch to Nearest anchor only when a more detailed local sequence is required.

8. Edit market schedules, time zones, weekdays, and segments when researching another venue or schedule convention.

This indicator can be placed on any intraday symbol. However, its boundaries remain the configured cash-market references and do not automatically become the native trading session of the charted instrument.

Why this is a separate study

This script is not a continuous session highlighter.

A conventional session highlighter answers:

"Which session interval contains this bar?"

This script instead answers:

"What scheduled events occurred at this timestamp, and how did the configured active-market state change across that boundary?"

It intentionally does not draw session backgrounds, session boxes, opening ranges, session highs or lows, price levels, volume statistics, volatility measures, directional bias, entry signals, exit signals, targets, or strategy results.

It is also different from a generic recurring time marker.

A generic time marker places independent objects at selected times. This script constructs linked market schedules, models separated trading segments, consolidates simultaneous events, evaluates the configured state immediately before and after every unique timestamp, classifies the resulting transition, and presents the result as a chronological handoff sequence.

The focus is deliberately narrow: scheduled cash-market boundary structure and active-market identity changes.

Limitations and interpretation

This is a configurable reference-schedule study, not a live exchange-status service or an official exchange calendar.

The script does not automatically model:

- Exchange holidays
- Early closes
- Delayed openings
- Unscheduled closures
- Security-specific halts
- Historical changes to exchange schedules
- Opening or closing auction phases
- Instrument-specific pre-market or post-market sessions

The Sydney 10:00 and 16:00 defaults are rounded regular-market reference boundaries. Security-level opening sequencing and the later closing auction are outside the model.

The Hong Kong defaults represent the morning and afternoon continuous-trading intervals ending at 16:00. The subsequent closing auction is outside the model.

The remaining schedules likewise represent editable main cash-session references rather than every auction, extended-hours period, or product-specific rule.

Users should verify and edit the reference hours when exact exchange-calendar treatment is required.

Market codes should remain unique. The HANDOFF comparison uses the configured active-market codes to identify changes in composition. Assigning the same code to different enabled markets can make an identity change ambiguous.

The script requires an intraday chart. On a daily or higher timeframe, the Boundary Strip reports that an intraday timeframe is required.

Projected boundaries are recurring schedule references only. They do not predict price direction or confirm that a market will open on a holiday or exceptional date.

ACTIVATE, OVERLAP +, HANDOFF, OVERLAP -, DEACTIVATE, and INTERNAL are descriptive schedule classifications. They are not buy signals, sell signals, entry instructions, exit instructions, or assessments of future market behavior.

The script does not contain strategy orders, backtesting logic, performance statistics, or alert conditions.

The source code is published openly so users can inspect, verify, study, and modify the schedule and visualization logic.

כתב ויתור

המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.