Hello,

InWatchList() function call or any other check whenever symbol is in the watch list is very fast.
Internally watch lists are loaded at startup and resident in RAM.
They are implemented via hash tables/maps and computational complexity is O(log(n)).
Note that you can measure the timing of every function using AFL Editor,
Tools->Code Check And Profile.

Best regards,
Tomasz Janeczko
amibroker.com

On 2010-05-07 15:33, Joe Landry wrote:


Tomasz and Herman:
How does or how do you think it will perform in an optimization using a "pedestrian" 3.4 MHz dual core PC?

I would expect the logic is lightening fast and those watchlist symbols are probably held in memory but intuitively I'm thinking this involves overhead - but is it significant percentage of the whole. Guess it's always "it depends". How many symbols in the watchlist and what ops are being performed on each symbol.
Best regards
Joe

    ----- Original Message -----
    *From:* Herman <mailto:[email protected]>
    *To:* Tomasz Janeczko <mailto:[email protected]>
    *Cc:* [email protected] <mailto:[email protected]>
    *Sent:* Friday, May 07, 2010 8:00 AM
    *Subject:* Re: [amibroker] Is it possible for AB select WL in an
    Optimization?

    Thank you!!!!

    I knew there was a simpler way :-)

    You just saved me a lot of headaches!

    Have a great day, I will ;-)

    herman


        


    Hello,

    The technique I am using is as follows:
    I create a number of watch lists and then a single "master" watch
    list that contains
    all symbols that are included in former watch lists.

    Then I use AA "Filter" and set "Apply to" this master watchlist.

    In the AFL code I am using

    CorrectWatchList = InWatchList( WL ); // where WL is the watch
    list number I would like to use at the moment

    Exclude = NOT CorrectWatchList; // you can use Exclude variable or...

    Buy = CorrectWatchList AND Buy;
    Short = CorrectWatchList AND Short;

    Best regards,
    Tomasz Janeczko
    amibroker.com

    On 2010-05-07 13:48, Herman wrote:

    Hello,

    I want to run an optimization where the optimized variable is a
    Watchlist number so that on each iteration another WL is
    Backtested, like so:

    WL = Optimize( "WL Number",10,20,1);

    How do I make the Backtester test the Watchlist as specified by
    the optimizer vairable (WL)?

    I have a complex solution that shuffles WL contents (slow!) but
    there ought to be a "two-liner".

    I would like to do this in afl.

    Many thanks for any ideas you may have,
    Herman.




Reply via email to