dear team, I'm trying to create column in my exploration window include art values of several symbol in custom watchlist, according to my code does not do that, it's generated several columns because there is an iteration case.
my processes
1- insert list number parameter.
2- iterate over the watchlist number to create date parameter for all tickers in the watchlist.
3- get art value in custom date.
4- addcolumn include art values in specific date.
is there any way to get art values of all symbols in my watchlist in single column?
symbols = "";
atrd=0;
start=0;
WatchlistNum = Param( "WatchList Number", 1, 0, 5000, 1 );
//Retrieves comma-separated list of symbols belonging to given category Supported categories
Watchlist = CategoryGetSymbols( categoryWatchlist, WatchListNum );
//"stocknum" - gives you the ordinal number of currently analysed symbol
if( Status( "stocknum" ) == 0 )
{
for( k = 0; ( sym = StrExtract( Watchlist, k ) ) != "" ; k++ )
{
symbols = sym;
start = ParamDate( symbols+" "+NumToStr(K,1)+" "+"(Intial Date)", "2024-03-14" );
dn = DateNum();
inDatesRange = True;
newday = iif( dn == start, 1, 0 );
atrd = ValueWhen( newday , ATR( 16 ));
AddColumn(atrd,"ATR",1.2);
}
//AddColumn(atrd,"ATR",1.2);
}
// AddColumn(atrd,"ATR",1.2);
