How to check in MQL 5 Account type is demo or live?

To add comments, please log in or register
kumaillakhani
166
kumaillakhani  

Hello Everyone,

I am vew new in MQL 5 programming please guide me that how could I check in MQL 5 that Account type is demo or live?


Thank u in advance.

Regards,

Kumail Raza

Marco vd Heijden
Moderator
8153
Marco vd Heijden  
  ENUM_ACCOUNT_TRADE_MODE tradeMode=(ENUM_ACCOUNT_TRADE_MODE)AccountInfoInteger(ACCOUNT_TRADE_MODE); 

//--- Find out the account type 
   switch(tradeMode) 
     { 
      case(ACCOUNT_TRADE_MODE_DEMO): 
         Print("This is a demo account"); 
         break; 
      case(ACCOUNT_TRADE_MODE_CONTEST): 
         Print("This is a competition account"); 
         break; 
      default:Print("This is a real account!"); 
     } 
To add comments, please log in or register