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

[amibroker] Re: Hitting the AFL execution limit?



PureBytes Links

Trading Reference Links

Hi Sidhartha70,

The afl script took 0.6561 sec to execute. And that's with less symbols.

I just found a way to deal with the problem:

The Excel.Application.Run method blocks, but WshShell.Run doesn't. So
I simply do this in AFL:

      WshShell = CreateObject("WScript.Shell");
      WshShell.Run( "D:\afl\system2a\invoke.vbs");

invoke.vbs then call Excel.Application.Run("some macro").

Data between Amibroker and Excel are exchanged via text files.

Thanks a lot to everyone!



--- In amibroker@xxxxxxxxxxxxxxx, "sidhartha70" <sidhartha70@xxx> wrote:
>
> If you goto preferences>miscellaneous and select 'show chart
> timings'... how long does the chart is question take to redraw?? It
> should tell you once you have selected this option.
> 
> What type of database are you using...? What data provider? What
> resoltuion of bars (i.e. tick or 1 min etc)...?
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "sonyfanaticsss"
> <sonyfanaticsss@> wrote:
> >
> > Hi Tomasz,
> > 
> > I'm aware that afl is faster than excel macro. But I've already done
> > an afl implementation of this code and it slows down the other chart
> > significantly.
> > 
> > The idea is that porting this code would allow Amibroker to do its
> > stuff and Excel to do some other stuff, simultaneously.
> > 
> > The Excel.Application.Run method obviously is not the right choice...
> > I wonder if there's any other way round?
> > 
> > Thank you.
> > 
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <groups@> wrote:
> > >
> > > I don't think it is good idea.
> > > Excel will be many times SLOWER than AFL.
> > > And of course any script .RUN waits until completion.
> > > 
> > > Best regards,
> > > Tomasz Janeczko
> > > amibroker.com
> > > ----- Original Message ----- 
> > > From: "sonyfanaticsss" <sonyfanaticsss@>
> > > To: <amibroker@xxxxxxxxxxxxxxx>
> > > Sent: Tuesday, August 26, 2008 5:48 AM
> > > Subject: [amibroker] Re: Hitting the AFL execution limit?
> > > 
> > > 
> > > > Hello,
> > > > 
> > > > To solve the problem mentioned in the post below, I've ported
> the code
> > > > to Excel. A AFL formula is used to open Excel and run the macro
> (with
> > > > vbscript).
> > > > 
> > > > But now I have a new problem. Amibroker seems to halt until the
> macro
> > > > finished its calculation. And if the macro takes too long to
finish,
> > > > Amibroker will popup a dialog box asking me to either "switch
> to" that
> > > > application, or "Retry". 
> > > > 
> > > > I think the problem is in the OLE vbscript, because the
> > > > Excel.Application.Run("some macro") method do not return until the
> > > > macro is finished.
> > > > 
> > > > I wonder if anyone can help?
> > > > 
> > > > Thank you.
> > > > 
> > > > 
> > > > 
> > > > --- In amibroker@xxxxxxxxxxxxxxx, "sonyfanaticsss"
> > > > <sonyfanaticsss@> wrote:
> > > >>
> > > >> Hi,
> > > >> 
> > > >> I've 6 formulas running in my active window now, and when I
> > scroll the
> > > >> chart with my mouse button there is a very noticeable lag in the
> > > >> redraw speed. The top chart draws first and the bottom chart
> last. I
> > > >> think it takes almost one second for the bottom chart to update
> with
> > > >> new plots and values.
> > > >> 
> > > >> I wonder if I have hit the AFL execution limit, or is this just
> > normal
> > > >> phenomenon?
> > > >> 
> > > >> Thank you very much for your help.
> > > >>
> > > > 
> > > > 
> > > > 
> > > > ------------------------------------
> > > > 
> > > > 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/