The function calculates the margin required for the specified order type, on the current account, in the current market environment not taking into account current pending orders and open positions. It allows the evaluation of margin for the trade operation planned. The value is returned in the account currency.
[in] The order type, can be one of the values of the ENUM_ORDER_TYPE enumeration.
[in] Symbol name.
[in] Volume of the trade operation.
[in] Open price.
[out] The variable, to which the value of the required margin will be written in case the function is successfully executed. The calculation is performed as if there were no pending orders and open positions on the current account. The margin value depends on many factors, and can differ in different market environments.