Function to know type of account

 
Is there a way for an EA to know if it is running in a demo account or a real account?

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
 
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");
 
Thanks for the speedy reply. It worked!
Reason: