Lipi Reference
Lipi

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
timezone series string

Return Type

series int

Example


          //@lipi=2
indicator("Week of Year Example", overlay=true)
// Current bar time
currentWeek = weekofyear(time)
// Plot week number in Data Window
plot(currentWeek, title="Week Number")