Create string array and insert my watchlist tickers in it

hello there, how can I create an array and fill it with watchlist tickers,
I'm using that process to get a ticker from my watchlist and couldn't insert it in the custom array.

function CreateAverageForWatchList( listnum ) 
 { 
    // retrive comma-separated list of symbols in watch list 
    list = CategoryGetSymbols( categoryWatchlist, listnum ); 

    Average = 0; // just in case there are no watch list members 

    for( i = 0; ( sym = StrExtract( list, i ) ) != ""; i++ ) 
    { 
       f = Foreign( sym, "C" ); 
       if( i == 0 ) Average = f; 
       else Average = Average + f; 
    } 
    return Average / i; // divide by number of components 
 } 

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.