[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] WatchList Listing Program - to identify WL Numbers



PureBytes Links

Trading Reference Links

In Ver 4.91 you can delete watchlists and the higher ones are renumbered. This makes it 
difficult to find the new number for the list. The program below lists the watchlists by 
number and name and the count of symbols contained in it. I've set it up to run in the 
Commentary window so the results print on the screen.  Just load the afl into your custom 
AFL folder and using the AA/Commentary window, load and run the program.

Bob Krishfield

//Count tickers in watchlist function
// load & run in Analysis commentary section

function CountWLSym( Listnum )
{
// retrive comma-separated list of symbols in watch list and count them
	list = GetCategorySymbols( categoryWatchlist, listnum );
	for( i = 0; ( sym = StrExtract( list, i ) ) != ""; i++ )
		{		if( i == 0 ) i = 0;		}
	return i; 
}
// --------------
if ( Status( "action" ) == 2 AND Status( "stocknum" ) == 0 ) //execute only once
{
	//LOOP through all WLs
	printf(" WL No     WL Name     Count  \n");
	for ( n= 0; n < 64; n++ )   // increase beyond 64 as you add more WL
 		{
			num = CountWLSym(n);  // invoke count function
			wlname = CategoryGetName(categoryWatchlist,n);
						 		 
			outstring = StrFormat(" %4.0f   ",n) + wlname + StrFormat("   %4.0f 
\n",num);
   		if (num > 0) printf(outstring);               //output only if list is filled
		 }	
  	//
	printf("\n Report Generated by AA/Guru Commentary - WLReport_c.afl ");
}
//



Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/