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

[amibroker] AFL out of bounds error?



PureBytes Links

Trading Reference Links

Hi,

Last week I asked how AFL runs with real time data coming in.  I
assumed that every time a new piece of data is obtained that the
entire AFL program runs from the first line to the last.  But
something else seems to be happening.

I have an AFL program that determines Swing Highs and Lows.  Most of
the programming uses array processing.  But I needed to use a for loop
through the array to find where multiple swing highs occurred without
a swing low between them. I then modify the array to only keep the
highest swing high or the last swing high if the highs are equal.  I
am using BarIndex() to identify the bars on which the swing highs occur.  

The program works fine the first time I drop it on the chart.  But
then, if I click to select a bar on the chart, I get an error that
array subscript is out of bounds.

If the program is running from the first line to the last line every
time there is new data (or when I select a bar on the chart), then
this would not be possible.  So something else must be going on where
only a portion of the code is being executed.

It seems that this might have something to do with QuickAFL mentioned
on the BarIndex() help screen, but I could not find any information
about QuickAFL or what is necessary to work around it.

How exactly does QuickAFL work if that is what is my problem?  Are
only some parts of the AFL program being run while other parts are
ignored/skipped because the values are thought to not have changed? 
Does QuickAFL affect both array and loop processing?

Any other tips or thoughts that I need to consider?

Thank-you,

Marty.





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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

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