Friday close and weekend gaps in an EA, the simple rules I added
Posted: Thu Oct 08, 2026 12:34 pm
Friday close and weekend gaps in an EA, the simple rules I added
my EA used to keep running into the weekend, and I was relying on luck that nothing would happen. A gap on Monday that took a stop out at a bad price convinced me to do something about it.
The rule I added is a Friday cutoff. After a set time on Friday, the EA stops opening new trades. Then, before the market closes, it closes whatever is still open. The time is set in GMT, using the offset calculation so it adjusts to the broker's server time.
There are a few details. Spreads widen as the market closes, so closing too late gets a bad price. I pick a time well before that. And if there's a trade that's in strong profit, I still close it, because I don't want exceptions. I also block pending orders from being placed after the cutoff, since they could trigger on the Sunday open.
It occasionally means I miss a late Friday move, but I've decided that's a fair price. The peace of mind of knowing nothing is open over the weekend is worth it.
my EA used to keep running into the weekend, and I was relying on luck that nothing would happen. A gap on Monday that took a stop out at a bad price convinced me to do something about it.
The rule I added is a Friday cutoff. After a set time on Friday, the EA stops opening new trades. Then, before the market closes, it closes whatever is still open. The time is set in GMT, using the offset calculation so it adjusts to the broker's server time.
There are a few details. Spreads widen as the market closes, so closing too late gets a bad price. I pick a time well before that. And if there's a trade that's in strong profit, I still close it, because I don't want exceptions. I also block pending orders from being placed after the cutoff, since they could trigger on the Sunday open.
It occasionally means I miss a late Friday move, but I've decided that's a fair price. The peace of mind of knowing nothing is open over the weekend is worth it.