can an MT4 close 100+ trades instantly at the same price?

 
I have an EA on MT4 that sometimes opens more than 100 trades on SP500. when EA closes all trades , they do not close at the same time. They close one by one and it takes about 1 to 3 seconds for all trade to close and because of this delay the closing price are different. what should i do to make EA close open trades almost instantly, at nearly same price. thankyou
 
  • Use SL or TP (not very suitable if the orders are not of the same type, because you cannot know the actual spread at the moment the SL or TP is reached).
  • Lock and use OrderCloseBy (may be prohibited by broker)
  • Migrate to MT5 and use OrderSendAsync

 

You're obviously using a Hedge account, wherein each order creates a separate position.

In contrast, a Netting account automatically averages all orders into a single position at a single price─closing one position happens all at once by default.*

* Of course, Netting is not an option if your strategy includes holding longs and shorts open simultaneously (not stated in your OP).