Order checked for validity, but not yet accepted by broker
ORDER_STATE_PLACED
Order_state_placed
You send a trade request (OrderSend) - its correctness is checked and if it is OK, the return is true. I.e., this is a response about correctness of trade request. The server has not yet received this request.
Further, when the request is accepted by the server, the response will be returned: ORDER_STATE_PLACED - order is set.
I cannot be sure, but that is how it logically works. I do not know any pitfalls.
Order checked for validity, but not yet accepted by broker
ORDER_STATE_PLACED
Order_state_placed
Send trade request (OrderSend) - its correctness is checked and if OK, it returns true. I.e. it is a response that the trade request is correct. The server has not yet received this request.
Further, when the request is accepted by the server, the response will be returned: ORDER_STATE_PLACED - order is set.
I cannot be sure, but that is how it logically works. I do not know what to avoid.
You have described the logic of working with OrderSendAsync, not OrderSend. After the current OrderSend, you will want to delete the order, and it is very likely that you won't be able to do so, since Started orders are not deleted.
Artyom Trishkin: You send a trade request (OrderSend) - its correctness is checked and, if OK, it returns true. I.e., this is a response that the trade request is correct. The server has not yet received this request.
Then how is OrderSend different from OrderSendAsync (apart from the name) ?
MQL5: Changed behavior of the OrderSend function when placing, modifying and withdrawing orders. The behavior is changed only when placing orders to external trading systems. Previously, the OrderSend function control was returned after the successful placing (processing) of an order on the broker's server. Now the control is returned only after the broker's server receives a notification from the external trading system that the order has been successfully placed there.
Below is a schematic representation of the previous (red arrow) and current behaviour of the function:
Since even with Before (in the schematic) OrderSend should have only been returned when Placed. Especially since the cases occur on different demo servers where there is no external system.
For my EA to work in a crash recovery block, I need to know how many commissions, swaps and charges were made in the last period. How can I get this information programmatically?
And when an order is already placed, something is returned?
ORDER_STATE_PLACED.
Identifier
Description
ORDER_STATE_STARTED
Order checked for validity, but not yet accepted by broker
ORDER_STATE_PLACED
Order_state_placed
You send a trade request (OrderSend) - its correctness is checked and if it is OK, the return is true. I.e., this is a response about correctness of trade request. The server has not yet received this request.
Further, when the request is accepted by the server, the response will be returned: ORDER_STATE_PLACED - order is set.
I cannot be sure, but that is how it logically works. I do not know any pitfalls.
Well it is already described:
Identifier
Description
ORDER_STATE_STARTED
Order checked for validity, but not yet accepted by broker
ORDER_STATE_PLACED
Order_state_placed
Send trade request (OrderSend) - its correctness is checked and if OK, it returns true. I.e. it is a response that the trade request is correct. The server has not yet received this request.
Further, when the request is accepted by the server, the response will be returned: ORDER_STATE_PLACED - order is set.
I cannot be sure, but that is how it logically works. I do not know what to avoid.
You send a trade request (OrderSend) - its correctness is checked and, if OK, it returns true. I.e., this is a response that the trade request is correct. The server has not yet received this request.
Then how is OrderSend different from OrderSendAsync (apart from the name) ?
I wrote above - just my idea of logic. I've been working in 4 for a long time. Therefore, I am unlikely to answer this question ;)
Look at paragraph 7 here https://www.mql5.com/ru/forum/23/page19#comment_2632240
Look here https://www.mql5.com/ru/forum/23/page19#comment_2632240
The explanation to the described case may be that the server on the old build
Forum on trading, automated trading systems and strategy testing
Changes in MetaTrader 5 Client Terminal builds
MetaQuotes Software Corp., 2016.07.14 15:30
Below is a schematic representation of the previous (red arrow) and current behaviour of the function:
The old build has nothing to do with it.
Good afternoon everyone!
For my EA to work in a crash recovery block, I need to know how many commissions, swaps and charges were made in the last period. How can I get this information programmatically?