this closing method is on every of my strategies, but now i can see still open trades
there is still some problem in MQL code
in old SQ this works 100% but in SQX still not
using B119 MQL code with
int sqMaxEntrySlippage = 0; //zero means unlimited slippage
int sqMaxCloseSlippage = 0; //zero means unlimited slippage
Status changed from New to Waiting for information
so are you sure it is caused by many strategies ending at the same time on Friday?
Do you see some error messages in logs?10 retry attempts should be enough, but I'd say 8 seconds mean and 25 seconds maximum sleep time is too long. It could be somehting like 2 and 10 seconds.
if i will have portfolio of 20 strategies (which could be the number of strategies in a real portfolio), maybe 10 retries will be enough - who knows?
we need to think about it what to set up to original SQX MQL code without need to change the template
yes there are errors on the log "trade context is busy" and after 10 retries it ends
so you suggest to increase the number of retries and lower the time values to 2-10?
int retry_attempts = 20;
double sleep_time = 1.0;
double sleep_maximum = 10.0;
int retry_attempts = 20;
double sleep_time = 1.0;
double sleep_maximum = 10.0;
and still having closed all open or pending orders
even after 20 retries its still "trade context is busy"
so if anyone will be using big portfolios of 50 strategies could have these problems.
And i am using these bigger portfolios which can have 50+ strategies on real accs
we need to find better way
on the old SQ MQL code we have made own changes in MQL code, if error - retry on next tick with random time in ms until its OK. I can have 99 strs in one MT and never have these problems - everything is closed on friday - no open or pending orders - it works 100%
Order reliable library seems doesnt work 100%
to the next week i will try change retries to 100 and i will see in the log how many retries need to be done on these ptfs
Otherwise, maybe increasing attempts to 100 could help. Could you send me a log from Friday so I an see how it is trying and fialing?
You can send it to support address with note to forward it to me, or you can attach it here.
Mark
could devteam make clear what these settings of the library means?
int retry_attempts = 10;
double sleep_time = 8.0;
double sleep_maximum = 25.0;
time is in seconds?
what will be your recommendation to make sure that every order will be executed in a portfolio? shorten the time or higher number of attempts?
thx