Starting from the built-in Relative Performance formula:

http://www.amibroker.com/kb/2015/08/29/how-to-add-symbol-labels-to-relative-performance-chart/

I am having trouble trying to customize the Tickerlist components depending on the symbol´s GICs sector. It would be substituting the formula :

_N( TickerList = ParamStr( "Tickers", "...................................." ) );

with something like this:

```
if ( InGICS ( "25" ) ) _N( TickerList = ParamStr( "Tickers","SPY,XLY" ) ); // Consum.Discretionary
else if ( InGICS ( "30" ) ) _N( TickerList = ParamStr( "Tickers","SPY,XLP" ) ); // Consum.Stapes
else if ( InGICS ( "10" ) ) _N( TickerList = ParamStr( "Tickers","SPY,XLE" ) ); // Energy
```

.

.

else _N( TickerList = ParamStr( "Tickers", "............." ) );

The problem that I am encountering is that the chart for the SECTOR stays fixed for all securities, it does not change in accordance with the GICs sector belonging. It must be an error in AFL programming. I have tried other options like changing the grammar by trial and error, like

if ( InGICS ( "25" ) ) { _N( TickerList = ParamStr( "Tickers","SPY,XLY" ) )......

but I cannot make it, the sector chart remains fixed.

Can anyone please help me to find out what´s the AFL error that I am making?

Thanks