INDICATOR MANUAL
Trading session indicator and countdownWorld Sessions & Countdown [AFD] · full manual · published to TradingView
Map five configurable session windows with city-based clocks, bounded session and overlap boxes, and separate wall-clock and bar countdowns.
Start here
What the indicator does, the questions it can help answer, and its fresh-install defaults.
World Sessions maps Sydney, Tokyo, London, New York, and one optional custom window. The four named cities resolve through IANA time-zone names rather than a fixed UTC-offset input, so each window follows the local clock rules TradingView applies to that city. The custom window instead uses the chart symbol’s exchange time zone.
Each session rectangle belongs to one session run and spans only that run’s bars and developing high-low extent. When two or more enabled sessions share bars, a separate overlap rectangle names the sessions involved. These rectangles describe when bars occurred; their top and bottom are not published as support, resistance, targets, or alertable price levels.
The dashboard deliberately separates wall-clock readings from bar readings. LOCAL, the open/closed dot, PROGRESS, and NEXT use the current clock when the script executes. BAR CLOSE applies only to a genuinely live bar, while BARS LEFT counts chart-timeframe bars remaining in the selected live session.
Fresh-install defaults6 documented defaults
Swipe or scroll horizontally to see every column.
| Area | Default | Result |
|---|---|---|
| Sessions | Sydney, Tokyo, London, New York on · Custom off | Uses the four built-in city windows and hides the exchange-time-zone custom row until enabled. |
| New York hours | Regular · Auto | Uses 09:30–16:00 New York time; Extended can resolve 04:00–20:00 for equities or 18:00–17:00 for futures. |
| Session boxes | Shown · filled · Medium vertical gradient · Overlap only | Draws the shared overlap rectangle without the individual session boxes until Overlap changes to Highlight overlap or Off. |
| Session names | Shown · Small · White · 40 kept | Places one name on each qualifying session or overlap rectangle and removes the oldest names beyond the history limit. |
| Dashboard | Top right · Small · Countdown frame | Shows the grid, local clocks, progress, next boundary, BAR CLOSE, and BARS LEFT with a 10-cell progress bar. |
| Alert controls | 30 seconds to bar close · Last bar off | Enables the time-threshold condition when a genuinely live bar has 30 seconds or less remaining; the last-session-bar condition remains disabled. |
How it works
How the indicator turns chart data into the states and drawings you see.
Named city time zones
Sydney uses Australia/Sydney, Tokyo uses Asia/Tokyo, London uses Europe/London, and New York uses America/New_York. There is no fixed-offset control to maintain at seasonal clock changes. The configured hours and weekday digits still remain user inputs.
One rectangle per session run
A run is keyed to the instant that configured session closes. The rectangle starts with that run, expands with its forming highs and lows, advances to its live edge, and stops when that run ends rather than joining every live bar in loaded history.
Overlap has its own geometry
When at least two enabled sessions are live together, the shared bars form a separate rectangle with one overlap color and a composite name such as LONDON + NEW YORK. A three-way overlap uses the same overlap color rather than implying a pair-specific meaning.
Weekday digits use the ending day
The weekday field uses 1 for Sunday through 7 for Saturday. For a window that crosses midnight, those digits name the day the session ends. The default 1800–1700:23456 futures window therefore runs from Sunday evening through Friday afternoon.
Clock and chart time stay separate
The dashboard’s LOCAL, open/closed state, PROGRESS, and NEXT cells use the wall clock available when Pine executes. BAR CLOSE is shown only on a genuinely live bar. BARS LEFT derives from the chart interval and the prioritized live session: Custom, New York, London, Tokyo, then Sydney.
New York adapts by selected family
Regular selects the cash window. Extended selects either the equity pre/post-market window or the CME Globex-style overnight window. Auto uses the symbol family, while Equities and Futures are explicit overrides for proxies or CFDs.
Drawings are intraday; the dashboard is not
Session boxes and names require intraday bars because a daily-or-higher bar cannot represent the shorter session window. The dashboard can still render on any timeframe because its session clocks are not derived from the displayed bar’s open time.
Output and state reference7 documented states
Swipe or scroll horizontally to see every column.
| Output or state | When it appears | Meaning |
|---|---|---|
| SESSION BOX | An enabled session run has chart bars and individual boxes are visible | Bounds that run’s bars and developing high-low extent; its edges are not exported as price levels. |
| OVERLAP BOX | Two or more enabled sessions share chart bars | Bounds only the shared bars and names the sessions participating in the overlap. |
| OPEN ROW | The wall clock is inside that row’s configured session | Shows the open dot, row tint, progress bar, and time remaining to the close boundary. |
| NOT IN SESSION | The session is closed but the chart can represent its window | The progress cell states that no part of that session is running now. |
| NO BARS HERE | The configured window contains no bars for the symbol and chart session | Distinguishes unavailable chart coverage from a merely closed session. |
| BAR CLOSE | The chart’s last bar is genuinely live | Counts seconds to that bar’s close; historical, replayed, delayed, or shut-market bars show a dash. |
| BARS LEFT | A prioritized configured session is live on the current chart bar | Reports chart-timeframe bars remaining in that session and stages the reading from green to amber to red. |
Settings
The 53-input reference follows the published Sessions, New York hours, Session boxes, Session names, Dashboard, and Alerts groups. Session hours and weekday digits define the time contract; appearance controls change the rendering without turning a rectangle edge into a level.
Sessions19 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| SydneysydneyOn | Toggle | On | — |
| Sydney hourssydneyHrs | Session | 0700-1600 | — |
| Sydney weekdayssydneyDays | Choice / text | 23456 | — |
| Sydney colorsydneyCol | Color | #AB47BC · 95% transparent | — |
| TokyotokyoOn | Toggle | On | — |
| Tokyo hourstokyoHrs | Session | 0900-1800 | — |
| Tokyo weekdaystokyoDays | Choice / text | 23456 | — |
| Tokyo colortokyoCol | Color | #FF7043 · 95% transparent | — |
| LondonlondonOn | Toggle | On | — |
| London hourslondonHrs | Session | 0800-1700 | — |
| London weekdayslondonDays | Choice / text | 23456 | — |
| London colorlondonCol | Color | #D32F2F · 95% transparent | — |
| New YorknyOn | Toggle | On | — |
| New York colornyCol | Color | #42A5F5 · 95% transparent | — |
| CustomcustomOn | Toggle | Off | — |
| Custom hourscustomHrs | Session | 0930-1600 | — |
| Custom weekdayscustomDays | Choice / text | 23456 | — |
| Custom colorcustomCol | Color | #90A4AE · 95% transparent | — |
| Custom session namecustomName | Choice / text | CUSTOM | — |
New York hours8 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| SessionnyMode | Choice / text | Regular hours (RTH) | Regular hours (RTH) · Extended hours (ETH) |
| Instrument familynyFamily | Choice / text | Auto by symbol | Auto by symbol · Equities · Futures |
| Regular hoursnyHrsRth | Session | 0930-1600 | — |
| Regular-hours weekdaysnyDaysRth | Choice / text | 23456 | — |
| Extended — equitiesnyHrsEthEq | Session | 0400-2000 | — |
| Extended-equities weekdaysnyDaysEthEq | Choice / text | 23456 | — |
| Extended — futuresnyHrsEthFt | Session | 1800-1700 | — |
| Extended-futures weekdaysnyDaysEthFt | Choice / text | 23456 | — |
Session boxes & overlap10 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Show session boxesshowBoxes | Toggle | On | — |
| Fill boxesfillBoxes | Toggle | On | — |
| Fill gradientfillGradient | Choice / text | Medium | Off · Soft · Medium · Strong |
| Gradient directionfillGradDir | Choice / text | Vertical | Vertical · Horizontal |
| Border transparencyborderTransp | Whole number | 0 | Min 0 · Max 100 |
| Border widthborderWidth | Whole number | 1 | Min 1 · Max 4 |
| Border styleborderStyle | Choice / text | Dashed | Solid · Dashed · Dotted |
| OverlapoverlapMode | Choice / text | Overlap only | Off · Highlight overlap · Overlap only |
| Overlap coloroverlapCol | Color | #66BB6A · 95% transparent | — |
| Session boxes keptmaxBoxes | Whole number | 20 | Min 10 · Max 250 |
Session labels4 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Show session names above priceshowLabels | Toggle | On | — |
| Label sizelabelSize | Choice / text | Small | Tiny · Small · Normal · Large · Huge |
| Label text colorlabelTextColor | Color | White | — |
| Session names keptmaxLabels | Whole number | 40 | Min 5 · Max 250 |
Dashboard10 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Show dashboardshowPanel | Toggle | On | — |
| PositionpanelPosition | Choice / text | Top right | Top left · Top center · Top right · Middle left · Middle center · Middle right · Bottom left · Bottom center · Bottom right |
| Panel backgroundpanelBg | Color | #16181E · 0% transparent | — |
| Grid linespanelGrid | Toggle | On | — |
| Panel framepanelFrame | Choice / text | Countdown | Off · Static · Countdown |
| Frame widthpanelFrameWidth | Whole number | 1 | Min 1 · Max 4 | Conditional |
| Text sizepanelSize | Choice / text | Small | Tiny · Small · Normal · Large · Huge |
| Progress bar widthprogressWidth | Whole number | 10 | Min 4 · Max 24 |
| Show time to bar closeshowBarClose | Toggle | On | — |
| Show bars left in sessionshowBarsLeft | Toggle | On | — |
Alerts2 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Alert at N seconds to bar closealertSecondsLeft | Whole number | 30 | Min 0 · Max 300 |
| Alert on last bar of sessionalertLastBar | Toggle | Off | — |
Alerts and limitations
What can notify you, what can change the output, and what the indicator cannot establish.
8 fixed alert conditions
The Sydney session changed from closed to open on the current bar.
The Tokyo session changed from closed to open on the current bar.
The London session changed from closed to open on the current bar.
The New York session changed from closed to open on the current bar.
The enabled-session count changed from at least one to zero.
The enabled-session count changed from fewer than two to two or more.
A genuinely live bar reached the configured seconds-left threshold; 0 disables the condition.
The prioritized live session reached zero chart-timeframe bars remaining while the optional control was enabled.
Limits to keep visible
- The indicator describes configured session structure and time. It does not predict volatility, liquidity, direction, a reaction at a box edge, or an appropriate trade.
- The city windows use named time zones, but their hours and weekday digits remain configured schedules. Holidays, partial sessions, emergency closures, venue breaks, and broker-specific trading hours are not discovered automatically.
- The DST statement is limited to time-zone resolution: TradingView applies each named city’s local clock policy. It does not establish that the configured window matches every venue or instrument convention.
- Pine has no independent timer. The wall-clock dashboard advances when the script executes, normally on ticks; on a shut market it can hold until a new tick, scroll, zoom, or settings change causes another execution.
- BAR CLOSE requires a genuinely live bar. Historical bars, Bar Replay, delayed feeds, and closed markets show a dash by design. BARS LEFT is a bar-structure count and can remain available where BAR CLOSE is not.
- Session boxes and names are intraday-only. Daily and higher timeframes can show the dashboard but suppress those drawings.
- A running session’s high, low, right edge, labels, progress, and countdown can change while current bars form. The published build has no completed replay-and-reload evidence supporting a blanket non-repainting claim.
- The script reads the current chart only and makes no request.security() calls. Session coverage therefore depends on the symbol, chart session, interval, and bars supplied by the active data feed.
- Drawing history is finite. Gradient steps use additional box objects, so the script can trim the requested session history to remain within its declared drawing budget.
- Alert creation and script conditions do not guarantee delivery. TradingView plan limits, chart execution, network state, notification settings, and alert-dialog frequency remain outside the script.
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 are there no rectangles after a fresh install?
Start with the Overlap setting. The shipped default is Overlap only, so the chart draws a rectangle only while two or more enabled sessions share bars. Choose Highlight overlap to show the individual session boxes as well, or Off to show session boxes without the overlap rectangle.
Why does a dashboard row say No bars here?
That session’s configured window has no bars in the chart data currently loaded. Tokyo on a US regular-hours equity chart is a common example. Check the symbol’s session setting and data coverage; the message distinguishes missing bars from a session that is simply closed.
Why did the LOCAL clock stop moving?
Pine has no timer that runs independently of the chart. The panel advances when the script executes, usually on a market tick. On a closed market, scroll, zoom, or change a setting to trigger another execution and refresh the displayed clock.
Why does BAR CLOSE show a dash?
BAR CLOSE appears only on a genuinely live bar. Historical bars, Bar Replay, a delayed feed, or a shut market intentionally show a dash because a countdown to an already completed bar would be misleading. BARS LEFT follows different chart-time structure and can still display.
Why are the boxes missing on a daily chart?
Boxes and session names are intraday-only. Switch to an intraday, time-based interval to map session runs. The dashboard can remain visible on the daily chart because its clocks use the wall clock rather than trying to fit a session inside one daily bar.
Why does the CME-style window begin on the wrong evening?
Check the weekday digits before changing the clock fields. For a window that crosses midnight, the digits name the day it ends. Keep 1800–1700 with 23456 for the Sunday-evening-through-Friday-afternoon sequence; 12345 shifts the week incorrectly.
Why are New York hours not the window I expected?
Check Session and Instrument family together. Regular uses 09:30–16:00. Extended uses the equity or futures window selected by Auto, Equities, or Futures. Override Auto when a futures-tracking ETF or CFD needs the underlying futures convention.
Why is a session rectangle still changing?
A live run is still developing. New forming bars can extend its high, low, and right edge. The rectangle stops changing once that configured session run ends; its edges remain descriptive extent, not fixed trade levels while the run is open.
Why is less box history retained after I increase the gradient?
Each gradient step uses another box object in addition to the outline. Stronger gradients therefore consume the drawing budget faster, and the script trims Session boxes kept to stay within its declared ceiling. Use a softer or flat fill to retain more runs.
Why did an existing alert keep the old session settings?
TradingView alerts retain the symbol, timeframe, and input snapshot they were created with. Delete and recreate the alert after changing session hours, weekday digits, instrument family, timeframe, or alert controls, then verify the new condition in the alert dialog.