The IANA time zone of the symbol's exchange, such as America/New_York.
syminfo.timezone is a simple string in IANA tz format. It is the zone in which the exchange publishes its sessions, not the zone your chart axis is set to.
Pass it as the timezone argument of time functions such as hour(), dayofweek() and timestamp() so a session test reads in exchange time whatever the viewer's settings are.
Type
simple string
Remarks
- Without a timezone argument, calendar functions already use the exchange zone, so you only need this to be explicit or to build a time with timestamp().
- On Sidechair: crypto symbols give Etc/UTC, futures give America/Chicago, and everything else gives America/New_York.
Example
//@version=6
indicator("First hour", overlay = true)
inFirstHour = hour(time, syminfo.timezone) == 9 and minute(time, syminfo.timezone) >= 30 or hour(time, syminfo.timezone) == 10 and minute(time, syminfo.timezone) < 30
bgcolor(inFirstHour ? color.new(color.orange, 88) : na)
if barstate.islast
label.new(bar_index, high, syminfo.timezone)See also
Runs on Sidechair