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

Re: [amibroker] Is there a faster way of writing this AFL?


  • Date: Thu, 3 Dec 2009 00:31:30 -0500
  • From: "Steve Dugas" <sjdugas@xxxxxxxxxxx>
  • Subject: Re: [amibroker] Is there a faster way of writing this AFL?

PureBytes Links

Trading Reference Links

Hi - Don't know if this will help you much unless you are plotting the same 
foreign tickers many times, but for those who optimize here is a good tip -

I have some systems that use a lot of market internals which my code called 
using Foreign().  I could see in the profiler that all the calls to 
Foreign() accounted for a lot of time, so following a thought that someone 
posted here a while back I wrote a seperate little code just to call the 
foreign tickers and plotted it as a chart. Not much to see, it just calls 
the foreign tickers and saves them to memory using StaticVarSet(). I can 
turn it on/off in the params and the title changes to "Success" in green to 
let me know whether the static vars are on or off   8 - )    Then in my 
system code I replaced all the Foreigns with StaticVarGet(), and just like 
that the new code ran 25% faster.

And actually I realized a productivity increase of 50% from it, because the 
code took 2+ days to run and it always finished in the middle of the night 
and the computer would sit there doing nothing for hours while I was 
sleeping - I could only run it every 3 days ( 10 times a month ). Now the 
new code finishes in 2 days and I can crank up another opt right away so I 
can run 15 in a month instead of 10 - a very nice improvement, and thanks 
very much to whoever mentioned it!



----- Original Message ----- 
From: "potatosoupz" <potatosoupz@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Wednesday, December 02, 2009 11:29 PM
Subject: [amibroker] Is there a faster way of writing this AFL?


> Plot(Foreign("ZZZZ", "Close")/Foreign(XYZ", "Close"), "ZZZZ/ZYX Ratio", 
> colorGreen);
>
> I have a few of these and they seem to be slowing down the whole app. Is 
> that possible?
>
>
>
> ------------------------------------
>
> **** 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/
>
> Yahoo! Groups Links
>
>
>
> 




------------------------------------

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

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:
    amibroker-digest@xxxxxxxxxxxxxxx 
    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/