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
If your proposal would only complement an existing function then nothing, otherwise it's not clear how a simple MqlPacketTradeRequest structure ...
... If MqlPacketTradeRequest structure is the structure of dynamic array of MqlTradeRequest structures, it may break the entire logic of server flooded with simple query structures.
Otherwise, at the terminal level, we'd have to split this packet into separate requests, which would negate the whole point of introducing this overload.
It seems that we "agreed" on such a variant because of asynchronous structure:
Where,
packet_request will include among other things an array of MqlTradeRequest structures...
Then all these thoughts are raw material for discussion :-)
IMHO a batch of identical applications is needed only for demonstration purposes, for work applications of different symbols, with different volumes and of course different directions will be used. And therefore each reguest will have to be checked separately, so there is no point in sending them in a batch.
...if MqlPacketTradeRequest structure is the structure of dynamic array of MqlTradeRequest structures, it can break the whole logic of server which is designed for simple query structures.
In my opinion, the OrderSendAsync() function should be made parametric instead of creating a loop for sending orders. For example OrderSendAsync(Symbol(), number, direction). As parameters: - symbol, - numberof orders, - direction of orders (buy, sell).
When conducting asynchronous trades, we do not know exactly how any particular request was triggered. In particular, we do not know how much volume was outstanding when one of the asynchronous requests was partially executed.
Can you please tell me if I understand correctly that both in forex trading and in stock trading, the order from history property
ORDER_VOLUME_CURRENT
allows us to unambiguously determine how fully an asynchronous request was executed? I.e., is it correct that when a market order is sent asynchronously in the forex market, when it appears in the history, we can be sure that if ORDER_VOLUME_CURRENT==0.0, the order has been completely executed, but if ORDER_VOLUME_CURRENT contains a non-zero value, then this value should be considered as the unfilled volume for that forex market order?
The question is prompted by the fact that here: https://www.mql5.com/ru/forum/3775/page28#comment_84851 emphasizes that the ORDER_VOLUME_CURRENT property refers to orders used in the stock market.
Question regarding the asynchronous request appearing in the history.
When OrderSendAsync() returns true and result.retcode field contains 10008, then according to the Reference, it "means that the request was sent, but does not guarantee that it reached the trading server".
Question: if an asynchronous request is successfully sent by the terminal, but doesn't reach the server, will such a request always end up in the history? In other words, can it happen that an asynchronous request is successfully (by all indications) sent to the server, but information about it won't appear in the history? If this scenario is possible, under what conditions?
Question: if an asynchronous request was successfully sent by the terminal, but didn't reach the server, will information about such a request always appear in the history? In other words, can it happen that an asynchronous request is sent to the server successfully (in all respects), but information about it does not appear in the history? If this scenario is possible, under what conditions?
If the request doesn't reach the server, it has no chance of appearing in the client terminal.
Oops! It turns out that a successfully sent asynchronous request can easily get lost and not get into the history.
It turns out that a successfully sent asynchronous request can easily get lost and not get into the history.
The point is that an asynchronous request has practically no "successfully sent" status.
Successful completion of the function only means that the "order looks correct from the client's point of view and was thrown into the network pipe, wait for an answer in OnTrade".