Join our facebook group for Amibroker afl code discussion https://www.facebook.com/groups/603980776889348

Solid Bollinger Band Indicator


Solid Bollinger Band Indicator
Solid Bollinger Band Indicator

//www.aflcode.com
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();
_SECTION_BEGIN("BB-EMA");
//Tp=(H+L+C)/3;
Per = Param("EMA Periods", 20, 2, 200, 1);
stper=Param("StDev Period",20,10,30,5);
w=Param("Width",2,0.5,4,0.5);
BBup=EMA(C,per)+w*StDev(C,stper);
BBdn=EMA(C,per)-w*StDev(C,stper);

Plot (bbup,"BB-UP",ParamColor( "Color", colorLightGrey ),styleLine);
Plot (bbdn,"BB-DN",ParamColor( "Color", colorLightGrey ),styleLine);
PlotOHLC(BBup,BBup,BBdn,BBdn,"BB-EMA", ParamColor("color",colorLightGrey), styleCloud);

Previous
Next Post »