Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
How about replacing GetAmountPositions with the regular OnTradeTransaction???
Approximately like this:
It won't help. Especially, in your variant there is no independence between OnTick at all.
It won't help. Especially since there is no independence between OnTick at all in your version.
Well, yes. I didn't take into account the fact that it's as far away from tick emulation as the moon is from Mars.
No matter how much delay you make, the OnTick event will not occur until the OnTradeTransaction is executed and nothing will be written in history.
You could do something like this:
i.e. we just wait until the position is in the listYou could do something like this:
i.e. we just wait until the position is in the listfxsaber:
It could be zero
Unlikely, by retcode the order is either executed or placed.
If it is zero, we wait 5 seconds for the end of the cycle (perhaps 2-3 is enough).
During this time the list of positions will hopefully be updated.
In the meantime, the list of poses will hopefully be updated.
On the dare.
On a dare.
no, the scientific method of the average ceiling)