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!

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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