OPEN-SOURCE SCRIPT

Trading Sessions [EDGE]

296
Trading Sessions [EDGE].

A continental trading-session engine that marks the four global sessions - Pacific, Asia, Europe, USA - in both Forex and Stocks mode, and shows at a glance which session is live, how long until each one opens or closes, and where price sits relative to each session open. Built for intraday traders who structure the day around session opens and want a single, timezone-correct view of the session clock.

How it works:
Every session is defined in the local business hours of its region and detected with an IANA timezone name (Australia/Sydney, Asia/Tokyo, Europe/London, America/New_York), so daylight-saving transitions are resolved automatically - the windows shift with each region's own clock and never need a manual seasonal adjustment. Detection is restricted to Monday through Friday. Two market modes share the same four continental sessions with hours native to each market type: in Forex mode they map to the Sydney, Tokyo, London and New York dealing desks; in Stocks mode they map to the region's anchor cash market - ASX Sydney (Pacific), a combined Tokyo/Hong Kong window (Asia), LSE London (Europe) and NYSE/Nasdaq (USA).

For each active session the script tracks a live high and low, drawing a range box that updates every bar and a horizontal line at the session open. The dashboard reads live clock time in each session's own timezone, so its open and close countdowns stay correct through every daylight-saving change, and it reports each session open price together with the current price's signed percent distance from it. All context is anchored to price - session boxes and open lines - plus the dashboard; there is no background shading.

What it calculates:
- Session state - which continental sessions are open right now, marked with a dot and a session-colored row in the dashboard
- Countdown - time until each session opens (when closed) or closes (when running), in the session's own timezone
- Session range box - the live high-to-low band of each session, kept on the chart as a prior-session reference
- Session open price - the price at which each session opened, shown in the dashboard
- Open Δ% - the current price change from the session open as a signed percent, green above the open and red below
- Session open line - a horizontal level at each session open, a widely watched institutional reference for retests
- Europe/USA overlap flag (Forex) - a dashboard note during the four-hour overlap, the deepest liquidity window of the day

Key features:
- Two market modes - Forex and Stocks - selectable from a single input, each with its own native session hours
- Four continental sessions - Pacific, Asia, Europe, USA - with per-session visibility toggles and editable hours
- Automatic daylight-saving handling through IANA timezones; no manual seasonal switching
- Combined Asia stock session spanning Tokyo and Hong Kong as one continuous window
- Live dashboard with active-session highlighting, per-session open/close countdowns, session open price and the signed percent change from it, with configurable position and text size
- Session range boxes and session open price lines, both fully colorable, with a configurable history depth to limit chart clutter
- Alerts for every session open and close, plus the Europe/USA overlap start
- Intraday-only operation with a clear on-panel notice on daily and higher timeframes

Who it's for:
Intraday and short-horizon traders who structure the day around session opens - Asia-range and London-breakout players, New York-open traders, and index or futures traders who track the Pacific-to-USA handover. The tool answers the questions that matter at the open: which session is driving price now, how long until the next one turns over, and how far price has travelled from each session open - a clean, timezone-correct session clock without the visual noise of overlapping session tools.

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.