Or use this one with output to Interpretation window
Slightly modified
/// @link https://groups.yahoo.com/neo/groups/amibroker/conversations/messages/184020
/// @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
EnableTextOutput(0);
wlstr = "";
category = categoryWatchlist;
format1 = "\n<i>#WL:</i> <b>%g</b>, <i>WL Name:</i> <b>%s</b>";
format2 = "%s<b>No Watchlist Memberships!</b>%s";
format3 = "%s<b>Watchlist Membership(s):</b>%s%s";
for( i = 0; CategoryGetName(category, i) != ""; i++ ) {
if( InWatchList( i ) ) {
catname = CategoryGetName(category, i);
wlstr += StrFormat(format1, CategoryFind(catname, category), catname);
}
}
if( wlstr == "" ) result = StrFormat(format2, EncodeColor(colorRed), EncodeColor(-1) );
else result = StrFormat(format3, EncodeColor(colorGreen), EncodeColor(-1), wlstr );
printf(result);