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

Return Type

series int

Example


          //@lipi=2
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")