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

[amibroker] Self referencing array element in array assignment



PureBytes Links

Trading Reference Links

I want to do something like below:

cond1 = iif(a == b, 1, 0);
cond2 = iif((crosses(c, ema(c,5)) and (h > min(valuewhen(cond1, h), 
valuewhen(cond2, h))), 1, 0);

My problem is not able to get H of bar with prev cond2 true, in order 
to compare it with H of bar with prev cond1 true, and assign true for 
current bar's cond2 as true.

Is it possible to reference previous assigned values of array for 
calculating and assigning current value. Specifically for 1/0(true/
false) type of array. I know that its possible to use AMA2 function if 
I want some value calculated. But, I want to check previous true 
condition in array.

I hope explanation is clear.



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/