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
__._,_.___
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
SPONSORED LINKS
__,_._,___
|