PureBytes Links
Trading Reference Links
|
Thanks Graham. Unfortunately, I tried ref(x,-p) and it produced the
same result, i.e. the software kept going down the array and would
stop until filter condition becomes false. With regard to valuewhen
(), I couldn't figure out the correct expression for specifying
individual elements in an array instead of the whole array. Any
ideas on what am I missing here?
--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxx> wrote:
>
> 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@xxx> 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/
|