Functions
weekofyear()
The week of the year of a time you supply. It is the one member of this family with no variable form: to get the current bar's week, pass the bar's `time`.
Syntax
weekofyear(series int time, series string timezone) → series int
Arguments
time required series int The time to read. Required. timezone series string The timezone to read it in. Required. Return Type
series int Example
indicator("Week of Year Example", overlay=true)
// Current bar time
currentWeek = weekofyear(time)
// Plot week number in Data Window
plot(currentWeek, title="Week Number")