Announcement

Collapse
No announcement yet.

Horizontal Band instead of Line

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

  • Horizontal Band instead of Line

    Is it possible to create a horizontal band that would change the background color between a range, say the high and low of the 1st hour, or something like that?

    Thanks,

    Todd Hudson

  • #2
    Todd
    Click here and download HiLo_firstXminutes.efs which will plot the High-Low range in the first user defined number of minutes.
    Then open the efs with the Editor and add the following line just before the return statement
    setBarBgColor(Color.yellow,0,vLow2,vHigh2);
    Replace yellow with a color of your choice. This will color the background contained between the High/Low of the first nn minutes.
    Alex

    Comment


    • #3
      Thanks,


      Todd Hudson

      Comment


      • #4
        Hi .. I cna get the range(high to low) to plot but is there a way to plot the range from the the first bar to the last bar of the day?

        Thanks

        Patrick

        Comment


        • #5
          Patrick
          Do you mean that you want to plot lines for the daily High and Low?
          Alex

          Comment


          • #6
            Well ... say I want to plot the average range.. and plot it for the day by changing the BG color from the opening bar forward .. 6.75 hours. From the range high/low. I suspect that this can't be done because the BG bar can't be set for a bar that hasn't plotted yet. Now that I think about it... LOL

            Comment


            • #7
              But I would like to know if I set the chart BG color for a region of the chart..

              Comment


              • #8
                Patrick
                You can using the yMin, yMax optional parameters in setBarBgColor()
                Enclosed below is an example and in the image that follows you can see the result
                Alex

                PHP Code:
                function preMain(){
                    
                setPriceStudy(true);
                    
                setStudyTitle("BG example");
                    
                setShowCursorLabel(false);
                }
                function 
                main(){

                    
                setBarBgColor(Color.lightgrey,0,1200,1220);
                    
                    return;

                Comment


                • #9
                  Thanks Alexis ... got it

                  Comment

                  Working...
                  X