See the user guide for an explanation: http://www.amibroker.com/guide/h_understandafl.html
Mike --- In [email protected], "sidhartha70" <[EMAIL PROTECTED]> wrote: > > Hi Tomasz, > > Thanks for answers to previous questions. > > I have a general question which keeps getting me confused. I come from > the world of C# and I find myself always thinking about processing > array elements in the form Array[x] and carrying out calculations > across arrays in that form. Obviously you don't often need to do this > with AFL. > > However, couple of things. If I am using a formula where the currently > calculated value of the array uses it's value 1 bar ago, of the form > in traditional C#, > > Array[x]=100*Array[x-1] > > for example. > > How do I reference the x-1 value of an array in AFL...? The reason I > ask is, previously I have used the BarCount-1 property (thinking that > processing must be happening at the current bar i.e. RHS of chart). > However, I noticed that when I moved the 'selector' line it changed > the value fo BarCount to where ever that line was... hence my forumlas > ended up all wrong. > > I'm sure there's a penny going to drop any minute here... and I'm > going to make the transition from C# to AFL. > > Can you help...? >
