PureBytes Links
Trading Reference Links
|
Terry and Graham, Thank you both for replying. As usual, I probably wasn't clear enough in my question, because I'm still not getting the right data returned. I've posted my code below (the pertinent stuff, I believe) to hopefully clear it up. I'm using it as an exploration right now. If I can get smart enough to understand scans and backtesting I would hope to use the same code to test how effective such a system would be. I perform the exploration on all stocks and all quotations. VolFilter=V>5*MA(V,50) AND MA(V,50)>=100000;
PriceFilter=C>O AND C>1 AND C>Ref(C,-1) AND O>Ref(C,-1); MaxHigh=HighestSince(Volfilter AND pricefilter,H,1); PeriodstoMaxHigh=HighestSinceBars(Volfilter AND pricefilter,H,1); Filter=Volfilter AND PriceFilter; AddColumn(C,"Close"); AddColumn(MaxHigh,"MaxHigh"); AddColumn(PeriodstoMaxHigh,"PeriodstoMaxHigh"); Basically, it's looking for high volume breakouts. Since I run the exploration on all stocks and all quotations, several instances of each stock will show up. For checking, I look at ABAX. You'll notice it satisfied the criteria on 3/20/2006. It closed at 24.65 that day and reached a high of 24.99 that day. On 3/21/2006, it reached a high of 26.00 and that was the highest high from the signal day (3/20/2006) till yesterday. My code doesn't
return the 26.00, it returns the 24.99 - the high of the signal day. Again, thank you both for educating me. Jeff fatboycato <fatboycato@xxxxxxxxx> wrote: 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
Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries for just 2¢/min with Yahoo! Messenger with Voice.
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
YAHOO! GROUPS LINKS
|