How to compare strings?

 
I'm trying to do the following:

  //decide for which currencies if we are trending or not      
   if( (Symbol() == "USDCHF") || (Symbol() == "USDCHFm") )
   {
         //do something specific for this currency
   }            
   else if( (Symbol() == "USDJPY") || (Symbol() == "USDJPYm") )
   {   
      //do something specific for this currency  
   }
   else if( (Symbol() == "GBPUSD") || (Symbol() == "GBPUSDm") ) 
   {
       //do something specific for this currency  
   }
   else if ( (Symbol() == "EURUSD") || (Symbol() == "EURUSDm") )
   {
       //do something specific for this currency  
   }
   else
   {
     //set some default variables
   }



I am having a problem comparing the strings like "EURUSD" to what Symbol() returns, I think my if statements are comparing numerical values.

Is there a way to compare strings? or is there another way to determine which currency pair you are in?

Thanks!

 
I'm trying to do the following:

  //decide for which currencies if we are trending or not      
   if( (Symbol() == "USDCHF") || (Symbol() == "USDCHFm") )
   {
         //do something specific for this currency
   }            
   else if( (Symbol() == "USDJPY") || (Symbol() == "USDJPYm") )
   {   
      //do something specific for this currency  
   }
   else if( (Symbol() == "GBPUSD") || (Symbol() == "GBPUSDm") ) 
   {
       //do something specific for this currency  
   }
   else if ( (Symbol() == "EURUSD") || (Symbol() == "EURUSDm") )
   {
       //do something specific for this currency  
   }
   else
   {
     //set some default variables
   }



I am having a problem comparing the strings like "EURUSD" to what Symbol() returns, I think my if statements are comparing numerical values.

Is there a way to compare strings? or is there another way to determine which currency pair you are in?

Thanks!


Works for me a OK as is.