Announcement

Collapse
No announcement yet.

Ensuring bands always appear on autoscaled charts

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ensuring bands always appear on autoscaled charts

    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?

  • #2
    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?

    Comment


    • #3
      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


      • #4
        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


        • #5
          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


          • #6
            Re: Re: Re: Re: Re: Ensuring bands always appear on autoscaled charts

            Wat Tyler
            You are most welcome
            Alex


            Originally posted by Wat Tyler
            Ah, - I see what you mean. Thanks!

            Comment


            • #7
              One more thing - can I make the plot invisible somehow (other than by making it's coloe equal to the background)?

              Comment


              • #8
                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

                Working...
                X