I need to ensure that a band created using the addBand() function will always appear on an autoscaled chart, regardless of where it is relative to charted price action. Can I do this?
Announcement
Collapse
No announcement yet.
Ensuring bands always appear on autoscaled charts
Collapse
X
-
Re: Ensuring bands always appear on autoscaled charts
Wat Tyler
You will not be able to do that using the addBand() function. You need to plot the line by returning its value from the script
Alex
Originally posted by Wat Tyler
I need to ensure that a band created using the addBand() function will always appear on an autoscaled chart, regardless of where it is relative to charted price action. Can I do this?
-
Re: Re: Ensuring bands always appear on autoscaled charts
Thanks Alex . I've just tried using addLineTool(LineTool.HORZ, y, nThickness, Color, name) but still don't get the line always appearing. Which function should I be using?
Originally posted by Alexis C. Montenegro
Wat Tyler
You will not be able to do that using the addBand() function. You need to plot the line by returning its value from the script
Alex
Comment
-
Re: Re: Re: Ensuring bands always appear on autoscaled charts
Wat Tyler
As I indicated in my previous reply you need to return the value from the script [ie plot the line rather than drawing it]. IOW it needs to be in the return statement
Alex
Originally posted by Wat Tyler
Thanks Alex . I've just tried using addLineTool(LineTool.HORZ, y, nThickness, Color, name) but still don't get the line always appearing. Which function should I be using?
Comment
-
Re: Re: Re: Re: Ensuring bands always appear on autoscaled charts
Ah, - I see what you mean. Thanks!
Originally posted by Alexis C. Montenegro
Wat Tyler
As I indicated in my previous reply you need to return the value from the script [ie plot the line rather than drawing it]. IOW it needs to be in the return statement
Alex
Comment
-
Wat Tyler
Not that I am aware of [assuming you are using the plot for the purpose discussed in this thread]
Alex
Originally posted by Wat Tyler
One more thing - can I make the plot invisible somehow (other than by making it's coloe equal to the background)?
Comment
Comment