MQL4 Reference Checkup IsDemo
Checks if the Expert Advisor runs on a demo account.
bool IsDemo();
Returned value
Returns true if the Expert Advisor runs on a demo account, otherwise returns false.
Example:
if(IsDemo()) Print("I work at a demo account"); else Print("I work at a real account");