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

Re: [amibroker] Does Amibroker always loop through the array?



PureBytes Links

Trading Reference Links

You only use the array identifiers when you are going to do a loop. It
is best to either use ref( X, -P) or valuewhen( barindex()==P, X )
With charts and the quickafl the value of barcount can vary as Ab will
only use the abrs necessary for the plot on screen. so you may
sometimes get incorrect values for barcount

--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://e-wire.net.au/~eb_kavan/ab_write.htm



On 2/6/06, tomsoyer_php <tom.soyer@xxxxxxxxx> wrote:
> Hi,
>
> I am new to Amibroker and just starting to learn AFL. I created a
> custom exploration to practice coding, and something very surprising
> happened. Here is the code:
>
> test=Close[BarCount-1]/Close[BarCount-200]-1;
> Filter = test>0;
> AddColumn (test,"Test");
>
> There is no syntax error, and the explore run fine when it was
> applied to all symbols and all qoutations. However, the results are
> not expected. It seems that for every symbol, the computer does not
> stop after the initial calculation and kept going down the Close
> array until the variable test is no longer less than zero. Is this
> the normal behavior for the Amibroker software? If so, is it even
> possible in Amibroker to calculate just once for each symbol,
> instead of going through the array?
>
> Thanks,
>
> Tom
>
>
>
>
>
>
> 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
>
>
>
>
>
>
>
>


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