[amibroker] Re: nbr of all stocks [1 Attachment]

 
[Attachment(s) from portfoliobuilder99@gmail.com [amibroker] included below]

Not sure exactly what you are trying to do, but here are a few options to try.


Filter=1;

AddColumn(Status("StockNum"), "no",1); // "stocknum" - gives you the ordinal number of currently analysed symbol


Run an Exploration, and in the AA window choose as your Filter, the Market, Sector, Watchlist or whatever it is you want to count up. Click Explore, can sort the column from top to bottom by clicking on column name.

see attached screen shot


///////////////////////////////////////////////////////////////////////////////////////////////

 

Or try this code extracted from the middle of this thread

https://groups.yahoo.com/neo/groups/amibroker/conversations/topics/180605

// count the number of symbols in a watchlist

// Two methods, just comment out one or delete one that you are not using



///////////////////////////////////////////////////////

numberOfAssets = StrCount( watchlist, "," ) + 1;

///////////////////////////////////////////////////////


function WLsymcount( listnum, category ) 

    symbols = CategoryGetSymbols( category, listnum ); 


    symcount = 0; 

    if( symbols != "" ) symcount = StrCount( symbols, "," ) + 1; 


    return symcount; 


printf( "%g", WLsymcount( wlnum = 0, categoryWatchlist ) );


/////////////////////////////////////////////////////////


// Or by WL name


function WLsymcount( WLname, category ) 

    listnum  = CategoryFind( WLname, category ); 

    symbols = CategoryGetSymbols( category, listnum ); 


    symcount = 0; 

    if( symbols != "" ) 

        symcount = StrCount( symbols, "," ) + 1; 


    return symcount; 

printf( "%g", wlsymcount( wlname = "BlahBlah", categoryWatchlist ) );

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

 

Or maybe this

 

https://www.amibroker.com/kb/2016/01/24/how-to-count-symbols-in-given-category/

 

Or maybe this

 

https://www.amibroker.com/guide/a_addtocomposite.html

See Example 1 

__._,_.___

Attachment(s) from portfoliobuilder99@gmail.com [amibroker] | View attachments on the web

1 of 1 Photo(s)


Posted by: portfoliobuilder99@gmail.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

Check out the automatic photo album with 1 photo(s) from this topic.
Count.PNG

Save time and get your email on the go with the Yahoo Mail App
Get the beautifully designed, lighting fast, and easy-to-use, Yahoo Mail app today. Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

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


.

__,_._,___

Related Posts


EmoticonEmoticon

:)
:(
=(
^_^
:D
=D
=)D
|o|
@@,
;)
:-bd
:-d
:p
:ng
:lv