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

[amibroker] General question about Array language vs recursive processing



PureBytes Links

Trading Reference Links

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...?


------------------------------------

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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

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