Function to know type of account
This function should do.
"MQL4: IsDemo"
bool IsDemo( )
Returns TRUE if the expert runs on a demo account, otherwise returns FALSE.
Sample:
if(IsDemo()) Print("I work at a demo account");
else Print("I work at a real account");
"MQL4: IsDemo"
bool IsDemo( )
Returns TRUE if the expert runs on a demo account, otherwise returns FALSE.
Sample:
if(IsDemo()) Print("I work at a demo account");
else Print("I work at a real account");
Thanks for the speedy reply. It worked!
I can't seem to find anything about the type of account in this list of Account functions:
* AccountBalance
* AccountCredit
* AccountCompany
* AccountCurrency
* AccountEquity
* AccountFreeMargin
* AccountLeverage
* AccountMargin
* AccountName
* AccountNumber
* AccountProfit