[Canonical HTML article](https://algoway.trade/blog/pine-script-session-timezone-dst.html)

Published: 2026-10-07T06:33:09+00:00

Updated: 2026-10-23T11:00:00+04:00

# **Pine Script Session Timezones: Chart Clock and DST Rules**

<img src="https://algoway.trade/static/img/blog-img/pine-script-session-timezone-dst.jpg" style="display:block; max-width:800px; width:100%; height:auto; margin:0 auto 1.5rem auto;" data-fetchpriority="high" decoding="async" alt="Pine Script Session Timezones: Chart Clock and DST Rules illustration" />

A session filter that is an hour wrong can still look perfectly tidy. The candles line up, the code runs, and the strategy trades the wrong part of the day with admirable consistency.

**Pine normally interprets a session in the symbol's exchange timezone, unless the function call supplies a timezone explicitly.** The clock selected on the TradingView chart is a separate display setting. Start with that distinction before moving a session boundary to compensate.

For a volume-weighted indicator, the reset boundary also changes which bars enter the average. See [why VWAP resets and how to compare session anchors](https://algoway.trade/blog/vwap-session-reset-anchor-period.html) before using a cross at the start of a trading day.

## Decide which clock owns the rule

TradingView distinguishes the exchange timezone, available as `syminfo.timezone`, from the chart timezone. Pine cannot read the chart's timezone setting. Changing that setting changes displayed times, not the script's calculations. The [official time documentation](https://www.tradingview.com/pine-script-docs/concepts/time/) explains these separate roles.

| Intended rule                              | Timezone choice                         | What to check                                         |
|--------------------------------------------|-----------------------------------------|-------------------------------------------------------|
| Follow the current symbol's exchange clock | Default timezone, or `syminfo.timezone` | Changing symbols may change the exchange timezone.    |
| Follow New York local business hours       | `America/New_York`                      | The UTC equivalent changes with daylight saving time. |
| Follow an unchanging UTC schedule          | `UTC+0`                                 | Local wall-clock hours may shift seasonally.          |

A fixed offset such as `UTC-5` is not a year-round substitute for New York. IANA region names account for daylight saving changes. For example, 09:30 New York corresponds to 14:30 UTC at UTC-5 and 13:30 UTC at UTC-4. Those are clock conversions, not two different trading rules.

## Make the session and weekdays explicit

This small Pine v6 illustration shades bars whose opening time belongs to a weekday New York window:

    //@version=6
    indicator("Weekday NY session window", overlay = true)
    string window = "0930-1600:23456"
    bool inside = not na(time(timeframe.period, window, "America/New_York"))
    bgcolor(inside ? color.new(color.teal, 88) : na)

In a session string, `1` means Sunday and `7` means Saturday, so `23456` selects Monday through Friday. Omitting the day suffix applies the window every day. `time()` returns `na` outside the specified session. See TradingView's [session-string reference](https://www.tradingview.com/pine-script-docs/concepts/sessions/).

This is an illustrative filter, not a tested trading strategy. It has no entry, exit or alert command. A weekday clock window is also not a holiday calendar or a guarantee that the destination market is open. Use the broker's actual schedule when deciding whether orders may be sent.

## A bar can straddle your cutoff

On an hourly chart, a session ending at 11:30 may include the bar opening at 11:00 even though the chart bar closes at 12:00. TradingView documents that `time()` and `time_close()` construct their own session-based bar representations; the latter can report 11:30 for that final session bar. It does not make the chart candle close early.

Align session boundaries with chart-bar boundaries where possible. Separately decide whether your rule concerns a bar's opening time, the signal calculation time or the eventual fill. An opening-time filter alone does not promise execution before the session ends. The [strategy alert timing guide](https://algoway.trade/blog/tradingview-strategy-alert-timing.html) covers that next step.

## Check the rule before reconnecting alerts

1.  Write down the intended clock, weekday set, timeframe and cutoff behavior. “Morning session” is not precise enough.
2.  On an intraday chart, inspect the highlighted opening and final bars on dates in both standard and daylight time. Compare their UTC times with their local times.
3.  Change only the chart display timezone. The highlighted bars should stay attached to the same events. Then change the symbol and check whether an exchange-default rule still expresses your intention.
4.  Check dates near clock changes and market holidays separately. Inspect the actual alert and fill times before treating the session filter as an execution limit.

TradingView's [time and session FAQ](https://www.tradingview.com/pine-script-docs/faq/times-dates-and-sessions/) provides additional session-filter examples. After changing a script's session inputs, follow the [guide to replacing alerts with old settings](https://algoway.trade/blog/tradingview-alerts-old-settings-update.html). A corrected chart is useful evidence; it is not evidence that an already running alert has adopted the correction.

A session filter and a holding-period exit answer different questions. For deadlines measured from entry, see [time stops using bar counts or elapsed minutes](https://algoway.trade/blog/time-stop-elapsed-time-bar-count.html), including the effect of session breaks and the entry-bar counting convention.

Last updated: October 23, 2026
