Watchlist in paramlist

hi i know the basic def paramlist

OrderType = ParamList(“Order Type”, “MKT|LMT|STP” ); OrderType = ParamList(“Order Type”, “MKT|LMT|STP” );

but if want to get a watchlist of stocks in paramlist how can i do it . can you kindly give solution on how it can be done

Here’s one method.

First find the watchlist number of the list you’re interested in, then get the symbols, which will give you a comma separated list. Finally replace the commas with a vertical bars and use the result in ParamList.

WatchlistName = "S&P 500";
wlnumber = CategoryFind(WatchlistName, categoryWatchlist ); 
Watchlist = CategoryGetSymbols( categoryWatchlist, wlnumber );

SymbolList = StrReplace(Watchlist, ",", "|");
Symbol = ParamList("Symbol", SymbolList);
13 Likes

awesome buddy it works thank you my friend