OpenDayOfWeek is a function in ProBuilder language that returns the day of the week on which the trading session opened for the current bar. This function is useful for strategies that require analysis based on specific days of the week, such as avoiding trades on Mondays or targeting specific market behaviors on Fridays.
OpenDayOfWeek
if OpenDayOfWeek = 1 then
// Code to execute if the market opened on Monday
endif
In this example, the if statement checks if the current bar opened on a Monday (where Monday is represented by 1). If true, the code inside the if block will execute.
No additional parameters are needed for this function, making it straightforward to use in any trading strategy that considers the day of the week as a factor.