Skip to content

Request Check Result Structure

The Structure of Results of a Trade Request Check (MqlTradeCheckResult)

Before sending a request for a trade operation to a trade server, it is recommended to check it. The check is performed using the OrderCheck() function, to which the checked request and a variable of the MqlTradeCheckResult structure type are passed. The check result will be written to this variable.

struct MqlTradeCheckResult
  {
   uint         retcode;             // Reply code
   double       balance;             // Balance after the execution of the deal
   double       equity;              // Equity after the execution of the deal
   double       profit;              // Floating profit
   double       margin;              // Margin requirements
   double       margin_free;         // Free margin
   double       margin_level;        // Margin level
   string       comment;             // Comment to the reply code (description of the error)
  };

Description of Fields

FieldDescription
retcodeReturn code
balanceBalance value that will be after the execution of the trade operation
equityEquity value that will be after the execution of the trade operation
profitValue of the floating profit that will be after the execution of the trade operation
marginMargin required for the trade operation
margin_freeFree margin that will be left after the execution of the trade operation
margin_levelMargin level that will be set after the execution of the trade operation
commentComment to the reply code, error description

See also

Trade Request Structure, Structure for Current Prices, OrderSend, OrderCheck

Last updated on