10009 TRADE_RETCODE_DONE - you have described it yourself - the order has been executed. This is simply the fact that the order has been successfully queued to the server for execution.
Further, if this order is executed (after all, it can be rejected by the server), then there is a trade - this is the result of the trade, with an opening price.
Асинхронные торговые приказы обладают огромным преимуществом - высокая скорость при массовой отправке. Однако, распространению таких приказов мешает некоторое неудобство - данные о результате приказа возможно увидеть только в OnTradeTransaction. Такое обстоятельство заставляет обывателя строить событийную модель своей ТС, если хочется...
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
10009 TRADE_RETCODE_DONE - you have described it yourself - the order has been executed. This is simply the fact that the order has been successfully queued to the server for execution.
Further, if this order is executed (after all, it can be rejected by the server), then there is a trade - this is the result of the trade, with an opening price.
Read about
OnTradeTransaction
It is called in Expert Advisors when a TradeTransaction event occurs. The function is intended for processing the results of trade request execution.
voidOnTradeTransaction( )
const MqlTradeTransaction&trans,// structure of a trade transaction
const MqlTradeRequest&request,// request structure
const MqlTradeResult& result// structure of response
);
My own experience.
There is another option, but it is 'advanced'.
My own experience.
There is another option, but it is 'advanced'.
Can you tell me, please, what is the "advanced" option?
Can you tell me, please, what is the "advanced" version?
https://www.mql5.com/ru/code/22166
https://www.mql5.com/ru/code/22166