Thanks Roberto, you spot on!
It was a daily signal started on Fri @ 00.00.00 and given at the closure of the bar (on Friday day’s close). And the program correctly took the trade as soon as possible (Sunday @ 21.00 GMT).
Actually, I made a mistake on my first message, as in my first post analysis I did not see it was a daily signal. The daily program includes only the check on the DayCond (and not the TimeCond).
I have now modified my code as follow – and it works (it now prevent trading on Sunday evening at the opening to execute signals generated on Friday’s close):
// Avoid to open new trades on Sunday at 21.00.00 (for signals generated on Friday’s close), to avoid wide spreads on Sunday night
// Avoid to open new trades on Monday at 00.00.00 (for signals generated on Sunday’s close), to avoid to consider Sunday as a relevant day to generate the signal.
DayCond = OpenDayOfWeek >= 1 AND OpenDayOfWeek <= 5
Sunday = DayOfWeek[0]
IF DayCond AND NOT Sunday THEN
Thank you for your support. Gaby