Discussing the article: "Trade transactions. Request and response structures, description and logging"

 

Check out the new article: Trade transactions. Request and response structures, description and logging.

The article considers handling trade request structures, namely creating a request, its preliminary verification before sending it to the server, the server's response to a trade request and the structure of trade transactions. We will create simple and convenient functions for sending trading orders to the server and, based on everything discussed, create an EA informing of trade transactions.

MQL5 features the OrderSend() function for placing pending orders, opening positions, as well as for changing orders and positions. The first input of the function is the structure of the MqlTradeRequest trade request. The 'action' field of the structure indicates the type of action to be performed, and the remaining fields are filled in depending on the selected action in the 'action' field. Thus, we send various requests to the server by passing the parameters necessary for a trade request to the function.

Author: Artyom Trishkin