For commentary, just do the same as you did for x : writeval(beginvalue(...., 
etc.

For chart use title = name() + "  " + beginvalue(... + etc. or = 
writeval(beginvalue(...  + etc.

Bill
  ----- Original Message ----- 
  From: nasdaq trader 
  To: [email protected] 
  Sent: Saturday, April 07, 2007 6:35 PM
  Subject: Re: [amibroker] bar counter


  Thanks Bill. I can get the bar count in the commentary window using the range 
markers

  x=EndValue(BarIndex()) - BeginValue(BarIndex ());
  writeval(x);

  I did not assign any studyID (and assigning a studyID did not make any 
difference). Is there any way to get the beginning and ending BarIndex for a 
trendline( that has a studyID of  say "AA") without using the range marker bars 
?

  Best regards,
  -VJ



  wavemechanic <[EMAIL PROTECTED]> wrote:
    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 ----- 
      From: nasdaq trader 
      To: [email protected] 
      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





------------------------------------------------------------------------------
  Be a PS3 game guru.
  Get your game face on with the latest PS3 news and previews at Yahoo! Games.  


------------------------------------------------------------------------------


  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

Reply via email to