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.

weekofyear(series int time, series string timezone) → series int
ParameterTypeRequiredDescription
timeseries intyesThe time to read. Required.
timezoneseries stringyesThe timezone to read it in. Required.

Returns series int — A series int.

indicator("Week of the year")
plot(weekofyear(time, syminfo.timezone))

See also sessions and intervals

Part of the function index.

Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.
Upgrade