BullCharts Forum Homepage
Forum Home Forum Home > BullCharts > BullScript
  New Posts New Posts RSS Feed: How to draw a horiz line?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

How to draw a horiz line?

 Post Reply Post Reply
Author
Message / View First Unread Post
kneighbour View Drop Down
Regular
Regular
Avatar

Joined: 12 Feb 2005
Location: Australia
Posts: 57
Post Options Post Options   Quote kneighbour Quote  Post ReplyReply Direct Link To This Post Topic: How to draw a horiz line?
    Posted: 27 Feb 2005 at 1:40pm

What i would like to do is draw a horizontal line at a calclated level.

ie I want to draw a line at a set price (say $3.00) - how is this done?

 

 

Back to Top
Peter View Drop Down
BullCharts Staff
BullCharts Staff
Avatar

Joined: 09 Sep 2004
Location: Australia
Posts: 241
Post Options Post Options   Quote Peter Quote  Post ReplyReply Direct Link To This Post Posted: 28 Feb 2005 at 9:42am
If you want to draw some fixed horizontal lines, use the horzline attribute. Eg: [horzline=20,80]

If you want to draw a calculated line, just make the calculation and return it as a result. Eg:
3*5;

If you want to make the calculation based on current prices, etc, then use the lastvalue function. Eg:
lastvalue( Low * 0.9);

This will calculate the result for the last bar and return that result on every bar.
Back to Top
kneighbour View Drop Down
Regular
Regular
Avatar

Joined: 12 Feb 2005
Location: Australia
Posts: 57
Post Options Post Options   Quote kneighbour Quote  Post ReplyReply Direct Link To This Post Posted: 28 Feb 2005 at 8:09pm

Originally posted by Peter

If you want to draw some fixed horizontal lines, use the horzline attribute. Eg: [horzline=20,80]

The way I read the manual, this puts lines at (in this example) the 20% and 80% points. Presumable on an oscillator. For aprice chart would I use

[horzline=1.23]   (for a line at $1.23)

Originally posted by Peter


If you want to draw a calculated line, just make the calculation and return it as a result. Eg:
3*5;

So this would be [horzline=3*5]   ??

 

Originally posted by Peter


If you want to make the calculation based on current prices, etc, then use the lastvalue function. Eg:
lastvalue( Low * 0.9);

So this would be [horzline=lastvalue( Low * 0.9)]   ??

Originally posted by Peter


This will calculate the result for the last bar and return that result on every bar.

This raises a good point - presumably this would fill the screen with horizontal lines? Can you alter the width of a line?

Back to Top
Peter View Drop Down
BullCharts Staff
BullCharts Staff
Avatar

Joined: 09 Sep 2004
Location: Australia
Posts: 241
Post Options Post Options   Quote Peter Quote  Post ReplyReply Direct Link To This Post Posted: 01 Mar 2005 at 10:53am
The horzline attribute only allows fixed numbers to be entered. (not calculations). Therefore, to get around the problem, we just return the calculation as a normal plot, but in such a way that it always returns the same result and appears as a horizontal line. (this is how people usually achieve horizontal lines in Metastock scripts).

Eg:

{Fixed horizontal line}
[horzline=20,80]

{Calculated horizontal line)
5*10;

{Calculated horizontal line based on price info }
lastvalue( Low * 0.9)





Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.69
Copyright ©2001-2010 Web Wiz