w = ParamList("Empty Watchlistt?" , "No|Yes");
y = Param("Set Watchlist Number", 16, 2, 60, 1);
// sets the watchlist number, but reserves the first 2 and last 4 watchlists
if(w == "Yes")
{ Filter = True;
CategoryRemoveSymbol("", categoryWatchlist, y);
}
else{
// This will send the results to respective watchlist
Filter = Buy OR Sell;
CategoryAddSymbol("", categoryWatchlist, y);}
//If still find problem let me know, bye
or try
// Or Second one
w = Param("Empty Watchlist First? Yes = 1, No = 2" , 2, 1, 2, 1);
w1 = Param("Autofill Watchlist? Yes = 1, No = 2" , 1, 1, 2, 1);
x = Param ( "Add Results to an Existing Watchlist? Yes = 1, No = 2" , 2 , 1 , 2 , 1 ) ;
// select whether to add results to watchlist or not
y = Param("Set Watchlist Number", 16, 2, 60, 1);
// sets the watchlist number, but reserves the first 2 and last 4 watchlists
Clear = IIf(w ==1, x==2, 0);
if( LastValue(Clear) ) {CategoryRemoveSymbol("", categoryWatchlist, y); }
// This will send the results to respective watchlist
Filter = Buy OR Sell;autoFILL = IIf( w1==1, Filter,0 ) ;
Add = IIf( x==1, Filter , 0 ) ;
if( LastValue( Add OR autoFill ) ) { CategoryAddSymbol( "", categoryWatchlist, y ); }