Announcement

Collapse
No announcement yet.

Bollinger Bands of Standard Deviation

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

  • Bollinger Bands of Standard Deviation

    I wish to plot the standard deviation of price with bollinger band of the standard deviation above and below the standard deviation line. I am very simply using two external efs studies in the simple script below.
    What I am confused about is that the bollinger study returns three parameters. This formula works but how to I get all three of the bollinger parameters to draw seperate lines?

    Mike Scott, Tarzana, CA

    function preMain() {
    setStudyTitle("BB of Std Deviation");
    setCursorLabelName("StdDev", 0);
    setCursorLabelName("BBofStd", 1);
    setDefaultBarFgColor(Color.blue, 0);
    setDefaultBarFgColor(Color.red, 1);
    }

    function main() {

    var Std = efsExternal("/Downloads/StandardDeviation.efs");
    var BBStd = efsExternal("/Bollinger/BollingerBands.efs");

    return new Array (Std,BBStd);
    }
    ....Mike

  • #2
    Hi Mike,

    Try:
    PHP Code:
    function preMain() {

    setStudyTitle("BB of Std Deviation");
    setCursorLabelName("StdDev"0);
    setCursorLabelName("BBofStd"1);
    setDefaultBarFgColor(Color.blue0);
    setDefaultBarFgColor(Color.red1);
    }

    function 
    main() {

        var 
    Std efsExternal("/Downloads/StandardDeviation.efs");
        var 
    BBStd efsExternal("/Bollinger/BollingerBands.efs");
        var 
    BBU getSeries(BBStd0);
        var 
    BBM getSeries(BBStd1);
        var 
    BBL getSeries(BBStd2);

        return new Array (
    Std,BBU,BBM,BBL);

    Note: Std scale is much different than that of BBSTD so Std plots at the bottom nearly flat and BBStd plot at the top compressed.

    Wayne

    Comment

    Working...
    X