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

RE: [amibroker] How to code this simple problem?



PureBytes Links

Trading Reference Links

check out ValueWhen()
 
herman
-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]On Behalf Of dsb_mac
Sent: Wednesday, March 01, 2006 3:20 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] How to code this simple problem?

How do you define a variable that will, upon a condition met, take the
current value but if the condition is not met then it will keep using
the value it has?

So let's say I have a signal for a new 10 day High [H==hhv(H,10)]. Upon
the signal you check if this new 10 day high is higher than the last 10
day high value. If it is then you accept the new value if not then you
use the previous one.

Example: price makes a 10 day high at 100 then falls for 20 days to $50
then makes a new 10 day high at $60. How do I make a variable that will
keep the 100 value until a new 10 day high exceeds 100?

It seems like ama2 might help but I can't figure it out.

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

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS