Shading Between Bollinger Bands

Optuma Forums Optuma Scripting Shading Between Bollinger Bands

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #52997
    • Topics: 4
    • Replies: 2
    • Posts: 6

    I’m trying to create Bollinger Bands that have a shaded area between the upper and lower bands.  This is the script I’m using, but I get invalid.  As Plot 1 will never cross Plot 2, I have selected the same color for each.  The goal is a 30 period, 1 SD, simple/close Bollinger Band with medium turquoise shaded in between the upper and lower bands.

    Plot1 = BB(BARS=30, STYLE=Simple, CALC=Close, STDDEV=1.000000);
    Plot2 = BB(BARS=30, STYLE=Simple, CALC=Close, STDDEV=1.000000, DEFAULT=LowerLine);
    Plot3 = Shade(Plot1, Plot2, DOWNCOLOUR=Mediumturquoise, UPCOLOUR=Mediumturquoise, SHADEALPHA=100);

    • Topics: 4
    • Replies: 216
    • Posts: 220

    Hi Erik,

    I just used your script on a Show Plot on a chart here and it worked ok (no invalid message)…


    If you copied the script from an email or webpage be sure to paste it into notepad first, to remove any special characters that can come in, then copy paste from notepad into Optuma.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Pin It on Pinterest

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.