Metadata / Reference
alerta.weekofyear
TradingView-compatible spelling: weekofyear, runs without warnings
Returns the ISO week number (weeks start on Monday) of a timestamp. With a timezone arg, the date is read in that timezone (Pine v6). Without one, the chart symbol's exchange clock applies (`syminfo.timezone`): UTC on crypto charts, New York time on a US stock — daylight saving included.
alerta.weekofyear(source?, timezone?) → series intParameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
source | series int | No | — | Timestamp source. Defaults to time. |
timezone | simple string | No | — | IANA timezone, "UTC", or "GMT±N". Defaults to chart exchange / UTC. |
Returns
series intExample
alerta.weekofyear
plot(weekofyear(), { pane: "oscillator" })Names and aliases
Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.