I think it could be useful to add a feature to close all positions of a strategy (open trades and pending orders) before market closure in friday in order to avoid opening gaps on monday and to get rid of the margin problem with brokers that change leverage during the weekend.
Agreed. I initially thought that restricting postilions to a 'time range' and checking 'exit at end of time range' would solve this, but SQ4 still holds positions over the weekend. Exit on Fridays does not solve this. Session = 24/5 does not solve this. I dont want open positions while I am asleep Monday to Friday, or over the weekend. Would be nice if this could be defined.
The time range range limitation, EOD and EOF should solve this problem. It closes all open orders at the preset time. When there is a gap at the end of the day, sadly we can't do anything about it. The orders wil be closed on the next tick. It is a matter of choosing the close time wisely.
If you experience problems caused by unclosed orders, please attach the problematic strategy and your project config and we will take a look at it.