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.
Friday close and weekend gaps in an EA, the simple rules I added
Re: Friday close and weekend gaps in an EA, the simple rules I added
Closing a trade in strong profit before the weekend was hard for me to accept too, but I agree. The gap risk does not care whether the trade is winning. A strong position on Friday can open on Monday well beyond the stop. For a scalping EA the edge is intraday anyway, so holding over the weekend is taking a different kind of risk the strategy was not designed for. The GMT offset part is important as well, because a cutoff set in server time drifts when clocks change.
It’s Fairman 
Re: Friday close and weekend gaps in an EA, the simple rules I added
Something I would add is to also handle the Monday open. Even if the EA is flat over the weekend, the first hour on Monday can have wide spreads and gaps from the weekend news. I have the EA wait for a set time after the open before it can trade, until spreads settle. That avoids opening a trade into a gap fill that is still moving. It is the other half of the weekend rule. Between the Friday cutoff and the Monday delay, the EA only trades in the hours it was actually tested on, which is the whole point.
It’s Fairman 