hi, what the code below does: it calculates "Setup"
which has a "1" where ever C closes below the BBandBOT. Then I subject the array
"Setup" to the loop. When inside the "i" loop and it finds a "1" then it enters
the "j" loop and will make a number of "waitPeriod" bars "0"
that follow the "1" bar at bar "i". When finished with the "j" loop I tell
it that i = j so that it enters the "i" loop at the value of "j"
etc.
So basicly if a "1" is found in the array "Setup"
it zeros out the next "waitPeriod" bars. I do not know of an
array based calculation in AFL that could do it more simple.
Subject: [amibroker] Re: Hold and
Valuewhen functions
Edward Would you mind translating into plain English the for - if loop
please? I've looked at the examples in the user's guide but I can't
follow the AFL. 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