MQL4 Reference
Account information
AccountFreeMarginCheck
| double AccountFreeMarginCheck( |
string symbol, int cmd, double volume) |
Returns free margin that remains after the specified position has been opened at the current price on the current account. If the free margin
is insufficient, an error 134 (ERR_NOT_ENOUGH_MONEY) will be generated.
Parameters:
| symbol |
- |
Symbol for trading operation. |
| cmd |
- |
Operation type. It can be either OP_BUY or OP_SELL. |
| volume |
- |
Number of lots. |
Sample:
if(AccountFreeMarginCheck(Symbol(),OP_BUY,Lots)<=0 || GetLastError()==134) return;
|
|
|