How to find out the ordinal number or name of the watchlist in which symbol is being dispalyed

@etcjkam

/// @link http://forum.amibroker.com/t/how-to-find-out-the-ordinal-number-or-name-of-the-watchlist-in-which-symbol-is-being-dispalyed/1590/3
wlstr = "";
category = categoryWatchlist;
for( i = 0; CategoryGetName( category, i ) != ""; i++ ) {
   if( InWatchList( i ) ) {
       catname = CategoryGetName( category, i ); 
       wlstr += "\n<i>#WL:</i> <b>" + CategoryFind( catname, category ) + "</b>, <i>WL Name:</i> <b>" + catname + "</b>";      
   }
}
printf( EncodeColor(colorGreen) + "<b>Watchlist Membership(s):</b>" + EncodeColor(-1) + wlstr );

4 Likes