Errors, bugs, questions - page 2106
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
A timeout indicates that the response from the server was not received within a reasonable time. But not the result of the order.
Hello.
Thank you.
Purely technically I understood the peculiarity. in this case: when time out - you have to wait for a new ticket to appear in the trades history, if a new ticket appears - then the trade or order is open.
By the way, this only happens on MQL5 VPS
It's not a problem on a home server.
I will think about it...
I will think about it.
Purely technically I understand the peculiarity. in this case: when you time out - you have to wait for a new ticket to appear in the trade history, if a new ticket appears - then the trade or order is open.
If a trade order was sent via a synchronous OrderSend, then there is no way to exit the OrderSend execution. Everything looks like a VPS Terminal bug.
through it.
The problem can in principle be solved, after receiving a timeout error to run the function of searching for new tickets in the history.
Otherwise the EA just sends a new request and again gets a timeout error, without getting a ticket.
Thank you.
The problem can in principle be solved, after receiving a timeout error, run the function of retrieving new tickets in the history.
You have to write it in SD. Otherwise, after each OrderSend you will wait three minutes for a timeout, getting the corresponding trade risks.
You need to write to the CD. Otherwise, after each OrderSend you will wait three minutes for a timeout and get the corresponding trade risks.
And so I did.
This error happens 1 out of 1000, and so far it happened only on VPS from MQL...The Expert Advisor gets error 10012 and tries to place the order again.
I would deprive you of Seller status for a year for such a code in the Marketplace.
This is the first time I've encountered such an error.
I have no such error in my code. no ticket means a trade has not opened. it means the EA is trying to open a trade again.The problem can in principle be solved, after receiving a timeout error, run the function to try new tickets in the history.
History has nothing to do with it. OrderSend sends the order, and it appears in the Terminal with ORDER_STATE_STARTED status.
But this does not mean that OrderSend has finished executing. OrderSend will continue to execute until the order status changes.
Therefore if you see a timeout, it is 99% certain that the order status is ORDER_STATE_STARTED(I see it, but it is not clear when I took the screenshot).
Moreover, the same timeout can happen without your OrderSend - when the MT5 server makes the OrderSend itself (TP/SL/MC/Expiration). But you will not see it in the Terminal.
I do not have such an error in my code. no ticket - it means that the trade has not opened. it means that the Expert Advisor is trying to open the trade again.
This is incorrect logic. After OrderSend fails and OrderSend succeeds, the current trading environment must be re-read completely. This rule should always be in effect.
About return codes. I do not analyze them in my EAs. I think the trading logic should not depend on them.
This is incorrect logic. After OrderSend fails and OrderSend succeeds, the current trading environment must be re-read completely. This rule should always be in effect.
I agree. it must be changed.