Download MetaTrader 5

How can I get the marginrequired in mt5

To add comments, please log in or register
Publish your article to let the traders see it in MetaTrader 5!
Sonne
167
Sonne 2014.07.31 14:06 

In MT4, we can call MarketInfo(Symbol(), MODE_MARGINREQUIRED) to get margin of 1 lots. In MT5, I try to get the value by SymbolInfoInteger(Symbol(),MarginInitial()), but it return value is 0.

Who can tell me how to do it? 

I'm MT5 build 965

thanks

Rodrigo Malacarne
Moderator
9895
Rodrigo Malacarne 2014.07.31 14:13  
spacks:

In MT4, we can call MarketInfo(Symbol(), MODE_MARGINREQUIRED) to get margin of 1 lots. In MT5, I try to get the value by SymbolInfoInteger(Symbol(),MarginInitial()), but it return value is 0.

Who can tell me how to do it? 

I'm MT5 build 965

thanks

Hello spacks, 

please take a look at the SymbolInfoDouble function, especially the options SYMBOL_MARGIN_INITIAL and SYMBOL_MARGIN_MAINTENANCE.

I hope it helps you somehow.

Thanks,
Malacarne 

To add comments, please log in or register