I tried you code with this test and it works fine.
printf("HH Since %1.2f",HighestSince(DateNum() == 1060103,H,1));
First, there's no data for 1/1/2006 so I used 1/3/2006.
Second, if the currently selected bar is 1/3/2006, then you get the high
of that day (52.18 on the $NDX), but when I selected days after 1/3/2006
I get right answers. For example, I picked yesterday and the result =
59.24 which is the high on 3/24/2006 (and is, in fact, the highest high
value since 1/3/2006).
--
Terry
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of fatboycato
Sent: Friday, April 07, 2006 14:31
To: [email protected]
Subject: [amibroker] HighestSince
I'm trying to find the highest value since a signal was given, but the
HighestSince() function doesn't work the way I anticipated it to work.
Hopefully, someone can give me insight into how to solve the problem.
Suppose stock ABC matches some criteria I'm looking for (e.g. high
volume breakout) on 1/1/2006. I would like to know the highest high
price it reached from then to now, 4/7/2006. When I try HighestSince
(myCriteria,H,1) I get the high value of the day the criteria were
true, i.e. 1/1/2006. What am I missing, please?
I'm sure there's a smarter way to do this in backtesting, but that's a
whole 'nother can of worms that I'm trying to understand. For now, if
I could just get the data I need exported to a .csv file I could do my
analysis somewhere else.
Thank you in advance.
Jeff
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
Yahoo! Groups Links
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
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/