Announcement

Collapse
No announcement yet.

Background colors

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

  • #16
    Here is another example using the Envelope study (attached)
    Alex

    Attached Files

    Comment


    • #17
      Is it possible to apply the background efs inside of another efs? I would like to apply the color changes to another efs of the $TICK on a chart of the YM #F. I do not want the main chart background changing color, only the efs of the $TICK section so I don't have to open a second chart and place it below my main one like I am doing now.

      Comment


      • #18
        brianb
        The logic used as an example in the background efs should be applicable to any study/indicator in the price window or in a study window.
        Alex

        Comment


        • #19
          How can this be changed to show bars or candles instead of lines?

          function preMain() {
          setStudyTitle("BackgroundcolorTick");
          setDefaultBarFgColor(Color.blue, 0);


          }

          function main(nLength) {
          var Cl = close(0,"$TICK");
          var vValue1 = 250;
          var vValue2 = 0;
          var vValue3 = -250;

          setBarBgColor(Color.lime,0,250,null);
          setBarBgColor(Color.lightgrey,1,-250,250);
          setBarBgColor(Color.red,2,null,-250);

          return new Array (vValue1+"",vValue2+"",vValue3+"",Cl);


          }

          Comment

          Working...
          X