MQL4 - automated forex trading   /  

Documentation

MQL4 Reference  Account information  AccountFreeMarginMode

 
Use the opportunities of
MQL5 in MetaTrader 5
Study the new MQL5 language
Study the new MQL5 language.
Reference is already available
double AccountFreeMarginMode( )
Calculation mode of free margin allowed to open positions on the current account. The calculation mode can take the following values:

0 - floating profit/loss is not used for calculation;
1 - both floating profit and loss on open positions on the current account are used for free margin calculation;
2 - only profit value is used for calculation, the current loss on open positions is not considered;
3 - only loss value is used for calculation, the current loss on open positions is not considered.
Sample:
if(AccountFreeMarginMode()==0)
   Print("Floating Profit/Loss do not use.");