Announcement

Collapse
No announcement yet.

setStudyTitle and other perMain settings don't set

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

  • setStudyTitle and other perMain settings don't set

    Simple script that works, but the title and a color doesn't change:

    function perMain(){
    setStudyTitle("Price percentage above or below a SMA");
    setDefaultBarFgColor(Color.black);
    }

    function main(){
    return ((close(0) - sma(200))/ sma(200)) * 100;
    }

    I removed and reapplied the study, like the documenation suggests, but nothing in perMain seems to work.

  • #2
    Re: setStudyTitle and other perMain settings don't set

    jpucilow
    Since the study is returning only one plot you can easily do that through Edit Studies. Right click the indicator pane and select Edit Studies. Then check the put a check in the Color box in the Override section and select the color (see following image)



    Then click OK and that will change both the color of the study title and of the plot (see following image)
    Alex





    Originally posted by jpucilow
    Simple script that works, but the title and a color doesn't change:

    function perMain(){
    setStudyTitle("Price percentage above or below a SMA");
    setDefaultBarFgColor(Color.black);
    }

    function main(){
    return ((close(0) - sma(200))/ sma(200)) * 100;
    }

    I removed and reapplied the study, like the documenation suggests, but nothing in perMain seems to work.

    Comment

    Working...
    X