There are a number of ways to
go but one is to draw the trendline with the trendline charting tool, assign a study id to it, and then use the range marker bars to define the beginning and end of the line. At that point, the number of bars is simply:
endvalue(barindex()) - beginvalue(barindex())
Bill
----- Original Message -----
Sent: Saturday, April 07, 2007 2:04 PM
Subject: [amibroker] bar counter
Hello,
I am trying
to implement a bar counter - this will indicate the number of bars between two ends of a trendline. The trendline in Amibroker(when double clicked) shows the x and y position of its ends, but I am not sure how to access this from a script. Any help in this would be greatly appreciated.
To give a general idea of how this is used, I have a system which relies on static bar counts from a starting point. The attached chart for Thursday (for the SP500) shows how turns are projected using 100 bar increments (on a 1min chart) starting from a low (blue arrow). The chart was generated with Wave59. I want to do the same using Amibroker.
Thank you in advance,
-VJ
Looking for earth-friendly autos?
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.26/746 - Release Date: 4/4/2007 1:09 PM