On my request, a friend wrote “trading robot”. Everything would be fine, but there is a problem or error. We don’t know how to fix it.
The problem is as follows-the Expert Advisor is given a pair of options for opening a trade. It is worth checking for magicid, that is, if the transaction is already open,
then do not open a new one. But there are such moments (when the connection to the server jumps or the market is closed/opened), the robot sends a request to
open a trade, but does not receive a response. Sends again-again silence. And now the connection is restored and all requests sent to
open a deal and not waiting for a response are opened. why does the magicid check not work? 30-40 open trades in one direction per day
1-2 seconds is very, very fraught. maybe we did something crooked? Good people, please tell me what is wrong and how to fix it?