Thank you Zheka for your suggestions!
As for 'less aggressive' limit orders, like a mid price, why would this help to prevent this from happening, other than a possible faster filling?
Regarding the OrderLimit. The manual states that MT4 won't treat this as an actual limit order, but will only create a 11 minute pending order.
Will this result in poor fillings, compared to a hard limit price?
The manual also states:
It is not recommended to use OrderLimit when limit orders are not properly supported by the broker.
So I'm not 100% sure if this is a good idea.
To make sure what works and what won't, I will start with
brokerCommand(SET_WAIT,500) and observe how it behaves.
Edit: I see that this command isn't supported for MT4 access, so I will switch to market orders instead.