jeebs #: To convert MarketInfo(Symbol(), MODE_MARGINREQUIRED) to mt5 version is order_calc_margin
Returns the margin in the account currency for performing a specified trading operation. It's double .
order_calc_margin( action,// order type (ORDER_TYPE_BUY or ORDER_TYPE_SELL ) symbols,// symbol name volume,// volume price// opening price )
You are mixing apples and oranges. "order_calc_margin" is for Python API for MetaTrader 5, not MQL5. It is the same functionality as "OrderCalcMargin" in MQL5.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Returns the margin in the account currency for performing a specified trading operation. It's double .
order_calc_margin (
action , // order type (ORDER_TYPE_BUY or ORDER_TYPE_SELL )
symbols , // symbol name
volume , // volume
price // opening price
)
You are mixing apples and oranges. "order_calc_margin" is for Python API for MetaTrader 5, not MQL5. It is the same functionality as "OrderCalcMargin" in MQL5.
"CAccountInfo::MarginCheck" is just an OOP wrapper for "OrderCalcMargin".