Announcement

Collapse
No announcement yet.

Band Lines

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

  • Band Lines

    Can someone help me add 2 green horizontal band lines to this formula at + - 100?
    I'll be happy editing the + - values and color through the editor later but can't seem to be able to make them showup in a working efs. I'm not very knowledgeable writing these things.
    All help is welcome,

    Brian



    var study = new CCIStudy(14, "Close");

    function preMain() {
    setCursorLabelName("CCI");
    setStudyTitle("rg/CCIh 14");

    }

    function main() {
    setPlotType(PLOTTYPE_HISTOGRAM);

    if (study.getValue(CCIStudy.CCI)>0)
    {setDefaultBarFgColor(Color.lime,0);}

    if (study.getValue(CCIStudy.CCI)<0)
    {setDefaultBarFgColor(Color.red,0);}

    return study.getValue(CCIStudy.CCI);
    }

  • #2
    addBand(80.0, PS_SOLID, 1, Color.red);

    will add a red band at 80, statement goes in preMain()

    Comment


    • #3
      Thank you very much David for showing me how to do this. It works great.

      Brian

      Comment


      • #4
        I am glad the brevity of my reply wasn't a hinderance to you.

        I'm always glad to do what I can.

        Comment

        Working...
        X