Download MetaTrader 5
To add comments, please log in or register
Do you want to write a technical indicator? Find solution in MQL5 Reference!
Sherif Hasan
7223
Sherif Hasan 2015.10.21 18:48 
if (((AccountStopoutMode() == 1)
&& (AccountFreeMarginCheck(Symbol(), OP_BUY, Lots) > AccountStopoutLevel()))
|| ((AccountStopoutMode() == 0)
&& (((AccountFreeMarginCheck(Symbol(), OP_BUY, Lots)/AccountEquity()) * 100) > AccountStopoutLevel())))

What could be the issue?

i would like to perform the following check before executing OrderSend()

honest_knave
969
honest_knave 2015.10.21 18:59  
if (((AccountStopoutMode() == 1)
&& (AccountFreeMarginCheck(Symbol(), OP_BUY, Lots) > AccountStopoutLevel()))
|| ((AccountStopoutMode() == 0)
&& (((AccountFreeMarginCheck(Symbol(), OP_BUY, Lots)/AccountEquity()) * 100) > AccountStopoutLevel())))
{
 // do something
};

You've left it open-ended. 

Sherif Hasan
7223
Sherif Hasan 2015.10.21 19:09  
honest_knave:

You've left it open-ended. 

 

oops. Thanks. got it.
/
To add comments, please log in or register