Lipi Reference Lipi

Functions

dayofweek()

The day of the week of a time you supply. The contract fixes the return type and not the numbering, so check which number means which day before comparing against a literal.

Syntax

                dayofweek(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("Day of Week Example", overlay=true)
// Get current bar day of week
currentDay = dayofweek(time)
// Plot day in Data Window
plot(currentDay, title="Current Day")