Whenever I press Explore button, I want this afl to explore and display only 1 symbol having smallest value of ROC(C,10), in Automatic Analysis window out of watch-list. But something is missing here, please help me..
wlnum = GetOption( "FilterIncludeWatchlist" );
List = CategoryGetSymbols( categoryWatchlist, wlnum ) ;
if ( Status("stocknum") == 0 )
{
StaticVarRemove( "values*" );
StaticVarRemove( "rank*" );
for ( n = 0; ( symbol = StrExtract( List, n ) ) != ""; n++ )
{
SetForeign ( symbol );
values = ROC(Close, 10);
RestorePriceArrays();
StaticVarSet ( "values" + "_" + symbol, values );
}
StaticVarGenerateRanks( "values", "values" + "_", -3, 1234 );
}
symbol = Name();
values = StaticVarGet( "values" + "_" + symbol );
bot = StaticVarGet( "bot" + "values" + "_" + symbol );
AddColumn ( bot, "rank" );
AddColumn ( values, "values" );
Filter = bot <= 10;
..................