I am using code from help to save explore results to watchlist, but the stocks in the list are not saved when i exit, i tried to find a function call to save the results but couldn't. I saved before exiting, that too didnt work.
What can i do to save the watchlist contents?
listnum = 29; // we use watchlist 10 for storing results
// erase the watchlist when we process very first symbol
if ( Status( "stocknum" ) == 0 )
// retrieve watchlist members
oldlist = CategoryGetSymbols( categoryWatchlist, listnum );
// iterate through the list and remove tickers
for ( i = 0; ( sym = StrExtract( oldlist, i ) ) != ""; i++ )
CategoryRemoveSymbol( sym, categoryWatchlist, listnum );
Diff = abs(UB-LB);
FC1 = Diff / pp < 0.001; // previous value was .001
FC2 = Close > 50;
FC3 = MA(V, 10) > 1000000;
Filter = FC1 AND FC2 AND FC3;
AddColumn(High, "High", 1.2);
AddColumn(Low, "Low", 1.2);
// check how many times Filter variable was true in the tested range
// if non-zero value detected, add current symbol to a watchlist
if ( LastValue( Cum( Filter AND Status( "barinrange" ) ) ) )
CategoryAddSymbol( "", categoryWatchlist, listnum );
@erukumk, modify your formula to include ONLY the lines used to create an exploration (delete the logic to clear/add to a watchlist). Apply it to the exploration and set the required parameter/filter etc.
Run the exploration and be sure that the report is listing all the symbols you expect.
Then "Save as" the exploration and its current settings settings as a new "project" (.apx).
Then create/modify a "batch" (.abb) including the following steps:
"Load Project" (select the saved project)
"Clear watch list" (enter the number of the watchlist you want to reset)
"Add results to watch list" (enter again the number of the watchlist you want now to fill)