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

Re: [amibroker] AFL code execution and optimization iterations



PureBytes Links

Trading Reference Links

You can count and you can limit, the number of times code is executed, using 
a static variable based counter. You can also monitor execution using 
DebugView.

imo, for a program as complex as AmiBroker, it would be very inefficient to 
even attempt predictable executions for all code segments.

Since in most cases only a few selective parts of your code may require 
controlled execution you might do better controlling your own executions 
using Status("Action") and other static variable based counters and flags. 
Sometimes you can also perform a single additional executions to get 
predictable single pass results.

afaik, You are wrong in saying that you cannot write code that executes just 
once, however many procedures cannot be completed in a single pass. For 
example when you apply new code and it is put through various error checking 
routines, or when performing portfolio operations - but even there Status() 
may help.

Best regards,
herman

--------------------------------------------------
From: "progster01" <progster@xxxxxxxxxxxxxxxxxx>
Sent: Saturday, February 16, 2008 7:53 AM
To: <amibroker@xxxxxxxxxxxxxxx>
Subject: [amibroker] AFL code execution and optimization iterations

> It is my understanding that during an AB optimization which the user
> specifies as, and understands logically to be, exactly N iterations,
> various statements in the AFL may be executed internally some number
> other than N times.
>
> This is a result of the design of AB.
>
> While we are assured that the results generated by AB are correct as
> to equity, statistics, etc., in the general case, we are cautioned
> that our code _cannot_ rely upon a specified # of iterations of any
> given AFL statement.
>
> If our code logic is counting, or writing files, or doing anything
> else based upon the # of iterations, then we are outside the design
> scenario of AB code execution.
>
> I invite correction if I have stated the above inaccurately.  (Of
> course, a more detailed explanation would have to come from TJ.)
>
> I'll add that I do, personally, find this to be one of the limiting
> edge cases to coding in AFL.  Writing code that expects and relies
> upon a fixed number of executions is a very "normal" thing to do.  Not
> being able to write such code is "abnormal", IMO.
>
> It might not actually make sense vis-a-vis the AB internals, but
> logically, given the situation, it seems to me that a new AB construct
> that allows the user to specify "Do this _exactly_ once per
> optimization iteration" would be a helpful thing to have.
>
>
>
>
>
>
> 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
>
>
>
> 


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/