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

[amibroker] Re: Counting events in AFL-just learning



PureBytes Links

Trading Reference Links

Gabe,

Cum() can certainly be used for counting, but from the conditions you
posted, particularly the bit about resetting the count at each new low
trigger point (condition 3), I think you may need to use a loop to do
that.

It may be possible to do it using just array functions, but I can't
think how off the top of my head and it's a relatively simple problem
for a loop.

The problem with using just array functions as I see it is the
iterative nature of the new lows, with each one being based on the
value of the previous one. This means they can't all be determined
independently just from price data, but need to be calculated in order
starting from the first one - ie. you can't determine the third one
until you've already determined the second one. Problems of this
nature are well suited to loops but not to array functions.

Regards,
GP


--- In amibroker@xxxxxxxxxxxxxxx, "rome_peace" <rome_peace@xxx> wrote:
>
> Just wanted to add something that might save people some time.
> 
> Can I just use the cum(1) function without getting into looping or
> other strange things?
> 
> Thanks
> Gabe
>



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

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/