_bollingerbands overlay

#1
another simple usefull but basic thing
bollingerbands!

the orginial bb , but slightly colored, and a middle line (I missed that)

_SECTION_BEGIN("_bollingerbands overlay");

P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 100, 1 );
Width = Param("Width", 2, 0, 10, 0.05 );
Color = ParamColor("Color", colorLightGrey );
Style = ParamStyle("Style", styleLine | styleNoLabel ) | styleNoLabel;
bbt = BBandTop( P, Periods, Width );
bbb = BBandBot( P, Periods, Width );
Plot( bbt , "BBTop" + _PARAM_VALUES(), colorBlack, Style );
Plot( bbb , "BBBot" + _PARAM_VALUES(), colorBlack, Style );
PlotOHLC( bbt, bbt, bbb, bbb, "", ColorBlend( Color, colorWhite, 0.9 ), styleNoLabel | styleCloud | styleNoRescale, Null, Null, Null, -1 );

bbm = (bbb + bbt) / 2; // middle bollingerbands
Plot( bbm , "BBMiddle" + _PARAM_VALUES(), colorBlack, styleDashed );

_SECTION_END();
 

Similar threads