Skip to content
AlertaChartAlertaScript / docs
AlertaScript / alerta.dayofweek
On this pageSignatureParametersReturnsExample

Metadata / Reference

alerta.dayofweek

TradingView-compatible spelling: dayofweek, runs without warnings

Returns the day of week from a timestamp (1=Sunday..7=Saturday). With a timezone arg, the day-of-week is computed 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.dayofweek(source?, timezone?) → series int

Parameters

NameTypeRequiredDefaultDescription
sourceseries intNo—Timestamp source. Defaults to time.
timezonesimple stringNo—IANA timezone, "UTC", or "GMT±N". Defaults to chart exchange / UTC.

Returns

series int

Example

alerta.dayofweek
plot(dayofweek(), { pane: "oscillator" })

Names and aliases

Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.

AlertaScript

No results found.

Search by name, alias, or keyword.