Re: [amibroker] Detecting last symbol of scan

 



On 5/7/2016 10:04 AM, Robbie Geary rgearyiii@gmail.com [amibroker] wrote:
I want to know the number of explorable symbols *before* the exploration completes.

Now that yow know that only symbols with no data will not be processed but all the others will, 
all you need is to detect the number of symbols with no data.


function junktickers()
{
    AB = CreateObject( "Broker.Application" );
    Stocks = AB.Stocks();
    qty = Stocks.Count;
    junkCount = 0;

    for( i = 0; i < qty ; i ++ )
    {
        Stock = Stocks.Item( i );
        Quotes = Stock.Quotations;
        count = Quotes.Count;

        junkCount += count == 0;
    }

    return junkCount ;
}

if( Status( "action" ) == actionExplore )
{
    if( Status( "stocknum" ) == 0 )
    {
        junk =  junktickers() ;
        _TRACEF( "Junk = %.f", junk );
        StaticVarSet( "JunkTickers", junk );
    }
}

__._,_.___

Posted by: Aron Pipa <aron@myafl.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (50)

Check out the automatic photo album with 1 photo(s) from this topic.
mannbhlgdepdakhp.png

**** 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