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

[amibroker] Re: Confusing Behaviour...!!!



PureBytes Links

Trading Reference Links

Thanks TJ. I do know about Quick AFL and I have read that document
throughly before.

But I can't see how it applies in this case with these specific
examples. And I definately can't see the difference between one being
inside a function or not.

Can you explain?

TIA

--- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <groups@xxx> wrote:
>
> Please read this:
> 
> http://www.amibroker.com/kb/2008/07/03/quickafl/
> 
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message ----- 
> From: "sidhartha70" <sidhartha70@xxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Saturday, September 20, 2008 12:50 AM
> Subject: [amibroker] Confusing Behaviour...!!!
> 
> 
> > Hi,
> > 
> > I'm trying to get some code to run as fast as possible. As such I've
> > been studying the 'Display Chart Timing' option under
preferences>misc.
> > 
> > I've noticed some behaviour that I can't explain. I hope others may be
> > able to.
> > 
> > Firstly I notice that when my chart requires 10,000+ bars I start to
> > notice latency in AmiBroker, despite running a very fast PC. I assume
> > that is normal at that number of bars...?
> > 
> > So here's the problem...
> > 
> > Under normal circumstances my code requires 297 previous bars.
> > 
> > However, If I add the following lines, the number of previous bars
> > required increases by 5,000 for each instance. So after these three
> > lines of code I am now needing 15,297 pervious bars.
> > 
> > H1=SelectedValue(TimeFrameGetPrice( "H", inDaily, -1 ));
> > L1=SelectedValue(TimeFrameGetPrice( "L", inDaily, -1 ));
> > C1=SelectedValue(TimeFrameGetPrice( "C", inDaily, -1 ));
> > 
> > Even stranger, when I add the following line of code into the main
> > body of code,
> > 
> > test=((BarCount - 1) - LastValue(TroughBars(L, 0.05,10)));
> > 
> > It adds 500 bars to my previous bars required (total new 797).
> > 
> > However if I call a function and simply return the following,
> > 
> > return ((BarCount - 1) - LastValue(TroughBars(L, 0.05,10)));
> > 
> > It now requires 5,000 previous bars instead of the 500 outside of the
> > function (total now 5,297).
> > 
> > Can anyone explain this behaviour...?
> > 
> > Many Thanks
> > 
> > 
> > 
> > 
> > ------------------------------------
> > 
> > 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/