Return the number of the day in the week. Monday is “1”, Tuesday “2”, etc.
Syntax:
1 |
CurrentDayOfWeek |
Example:
1 2 3 4 5 6 7 8 9 |
//Testing if today is Wednesday IF (CurrentDayOfWeek = 3) THEN Wednesday = 1 ELSE Wednesday = 0 ENDIF RETURN Wednesday |
@nicolas my code just went into a trade on a Sunday, when it’s not meant to. I’ve backtested today (on Sunday) and it’s showing CurrentdayofWeek = 7. According to the Probuilder function list, Sunday should be = 0. This issue has cost me 24GBP so I’m not too happy. Can you please clarify why this might be happening. Is Sunday = 0 or = 7?