|
OrderCheck
The OrderCheck() function checks if there are enough money to execute a required trade operation. The check results are placed to the fields of the MqlTradeCheckResult structure.
bool OrderCheck(
|
Parameters
request
[in] Pointer to the structure of the MqlTradeRequest type, which describes the required trade action.
result
[in,out] Pointer to the structure of the MqlTradeCheckResult type, to which the check result will be placed.
Return Value
If funds are not enough for the operation, or parameters are filled out incorrectly, the function returns false. In case of a successful basic check of structures (check of pointers), it returns true. However, this is not an indication that the requested trade operation is sure to be successfully executed. For a more detailed description of the function execution result, analyze the fields of the result structure.
In order to obtain information about the error, call the GetLastError() function.
See also
OrderSend(), Trade Operation Types, Trade Request Structure, Structure of Request Check Results, Structure of a Trade Request Result