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
- [ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4.
- step to open more than one order and close all order
- How profits are calculated ?
- 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).
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register