Announcement

Collapse
No announcement yet.

chart colors

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

  • chart colors

    Hi all,

    I calculate an expected range for the next day and want to draw that range in a different color after the last bar.

    I tried setBarBgColor( Color.yellow,0,1100,1125) for that matter but I could not succeed. I also could not get the meaning of 0 in the parameters cause when I change it nothing happens. I can only paint the range for the past bars when it is 0.

    any suggestions?

    thanks in advance

  • #2
    rookie2004
    The 0 is referred to the Series ie the element in the return statement (in this case the first one). If you returned more than one element (for example two moving averages) and wanted to paint the background based on the second one you would use 1.
    As to painting the background with setBarBgColor() that can be done only where there is a plotted value and since efs does not plot returns beyond the current bar you cannot paint the background
    Alex

    Comment


    • #3
      thank you for the immediate reply.

      I tried drawlineAbsolute() function with a thickness of 20 and it seems to do the work. However a semicircle is drawn to the ends of the line. is there a way to make it flat.? I tried different pen styles but for some reason they all give the same result.

      OR any other suggestion will be much appreciated. Is there a way to convert the price calues to Pixels?

      thanks again

      Comment


      • #4
        rookie2004
        You may want to try drawTextXxxx() with the optional pixel controls. See the EFS Function Reference in the EFS Help Center & Library for the syntax
        Alex

        Comment


        • #5
          thank you, but how do I change the pixels to price?

          Comment


          • #6
            rookie2004
            It does not look like there is a way to define specific price levels using drawTextXxxx() with the pixel controls so the only viable solution at this time seems to be the one you have already implemented ie drawLineXxxx().
            Alex

            Comment

            Working...
            X