String needs double quotes, was: How to check paramlist Value?

Hello,

How to check paramlist Value? The following has a error.

TickerList = ParamList("TickerList", "Coincident_indicator|Lagging_indicator" ); 
    if (TickerList == 'Lagging_indicator')	
    {
      color1  = colorBrown;
    }
    else 	
    {
      color1  = colorBlue;
    }

You need DOUBLE quotes for string, not single.

if (TickerList == 'Lagging_indicator')	 // WRONG
{

}

 if (TickerList == "Lagging_indicator")	// CORRECT
{

}

Single quotes denote single characters (letters), not string.

1 Like