what it means ...

#1
hi

just watching afl s in ami and come across Bollinger Band afl


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


just want to know what is use of this bold line :cool:
 

amitrandive

Well-Known Member
#2
hi

just watching afl s in ami and come across Bollinger Band afl


_SECTION_BEGIN("BBands");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 100, 1 );
Width = Param("Width", 2, 0, 10, 0.05 );
Color = ParamColor("Color", colorLightGrey );
Color = ColorBlend( Color, GetChartBkColor(), 0.5 );
Style = ParamStyle("Style", styleLine | styleNoLabel ) | styleNoRescale;;
Plot( bbt = BBandTop( P, Periods, Width ), "BBTop" + _PARAM_VALUES(), Color, Style );
Plot( bbb = BBandBot( P, Periods, Width ), "BBBot" + _PARAM_VALUES(), Color, Style );
PlotOHLC( bbt, bbt, bbb, bbb, "", ColorBlend( Color, GetChartBkColor(), 0.7 ), styleNoLabel | styleCloud | styleNoRescale, Null, Null, Null, -1 );
_SECTION_END();
just want to know what is use of this bold line :cool:
shubh03

The bold line as you have indicated plots a cloud for the Bollinger Bands.If you remove the line , you will get only the Bollinger Bands , not the area cloud.
 

KelvinHand

Well-Known Member
#3
shubh03

The bold line as you have indicated plots a cloud for the Bollinger Bands.If you remove the line , you will get only the Bollinger Bands , not the area cloud.
Your explanation is not good enough.
Just remove the styleCloud will remove the bollinger band cloud area also
Remove the PlotOHLC() statement also will serve the above function.
Not the bold line.

In order to plot the bollinger cloud area between the upper and Lower Band, you need to use the PlotOHLC() function.
PlotOHLC is to plot the shape in Open, High, Low, Close candlestick manner.

In this case, Top Band is BBT, Bottom Band is BBB.
So treat,

Open = BBT
High = BBT
Low = BBB
Close = BBB

like painting bearish candle in bar by bar. The rest of bold line - you can read the help guide yourself.

With this concept in mind, then you can modify to do two cloud area, one in mid to upper band, and one in mid to lower band as shown below.
PHP:
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 100, 1 );
Width = Param("Width", 2, 0, 10, 0.05 );
Color = ParamColor("Color", colorLightGrey );
Color = ColorBlend( Color, GetChartBkColor(), 0.5 );
Style = ParamStyle("Style", styleLine | styleNoLabel ) | styleNoRescale;;

Plot( bbt = BBandTop( P, Periods, Width ), "BBTop" + _PARAM_VALUES(), Color, Style ); 
Plot( bbb = BBandBot( P, Periods, Width ), "BBBot" + _PARAM_VALUES(), Color, Style ); 

bbm = MA(P, Periods);
Plot( bbm = MA(P, Periods), "BBMid" + _PARAM_VALUES(), Color, Style ); 


PlotOHLC( bbt, bbt, bbm, bbm, "", ColorBlend( colorDarkGreen, GetChartBkColor(), 0.7 ), styleNoLabel | styleCloud | styleNoRescale, Null, Null, Null, -1 );
PlotOHLC( bbm, bbm, bbb, bbb, "", ColorBlend( colorDarkRed, GetChartBkColor(), 0.7 ), styleNoLabel | styleCloud | styleNoRescale, Null, Null, Null, -1 );
 
Last edited:
#5
Your explanation is not good enough.
Just remove the styleCloud will remove the bollinger band cloud area also
Remove the PlotOHLC() statement also will serve the above function.
Not the bold line.

In order to plot the bollinger cloud area between the upper and Lower Band, you need to use the PlotOHLC() function.
PlotOHLC is to plot the shape in Open, High, Low, Close candlestick manner.

In this case, Top Band is BBT, Bottom Band is BBB.
So treat,

Open = BBT
High = BBT
Low = BBB
Close = BBB

like painting bearish candle in bar by bar. The rest of bold line - you can read the help guide yourself.

With this concept in mind, then you can modify to do two cloud area, one in mid to upper band, and one in mid to lower band as shown below.
PHP:
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 100, 1 );
Width = Param("Width", 2, 0, 10, 0.05 );
Color = ParamColor("Color", colorLightGrey );
Color = ColorBlend( Color, GetChartBkColor(), 0.5 );
Style = ParamStyle("Style", styleLine | styleNoLabel ) | styleNoRescale;;

Plot( bbt = BBandTop( P, Periods, Width ), "BBTop" + _PARAM_VALUES(), Color, Style ); 
Plot( bbb = BBandBot( P, Periods, Width ), "BBBot" + _PARAM_VALUES(), Color, Style ); 

bbm = MA(P, Periods);
Plot( bbm = MA(P, Periods), "BBMid" + _PARAM_VALUES(), Color, Style ); 


PlotOHLC( bbt, bbt, bbm, bbm, "", ColorBlend( colorDarkGreen, GetChartBkColor(), 0.7 ), styleNoLabel | styleCloud | styleNoRescale, Null, Null, Null, -1 );
PlotOHLC( bbm, bbm, bbb, bbb, "", ColorBlend( colorDarkRed, GetChartBkColor(), 0.7 ), styleNoLabel | styleCloud | styleNoRescale, Null, Null, Null, -1 );
nd what abt last null null null -1
 

Similar threads