Skip to main content

Multiple Bollingers for Amibroker (AFL)

demon over 15 years ago Amibroker (AFL)

  • Rating:
    3 / 5 (Votes 4)
  • Tags:
    channel, envelope, coloured, amibroker, bands

As of my quick disappoinment in future looking Hurst bands (posted somewhere here), I decided to try the same idea with fast and long period bands on one chart. Surely, that might have been done the numerous times before me. But I added nice looking clouds :)
Trade this as usual BB but sinergizing with each other, and use confirmations from other indicators or techniques of course.

(just drop formula on your price chart and adjust periods and widths to fit chart turning-points)

Screenshots

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("Bollinger Bands Pair");
  P = ParamField("Price field", -1);

  PeriodsF = Param("Periods fast", 20, 2, 100, 1);
  PeriodsS = Param("Periods slow", 150, 20, 500, 1);
  WidthF = Param("Width fast", 2, 0, 10, 0.05);
  WidthS = Param("Width slow", 2, 0, 10, 0.05);

  colBoxF = ParamColor("Border color fast", colorGrey40);
  colBoxS = ParamColor("Border color slow", colorDarkOliveGreen);

  styleBoxF = ParamStyle("Border style fast", styleDashed, maskDefault);
  styleBoxS = ParamStyle("Border style slow", styleDashed, maskDefault);
  
  colMAF = ParamColor("MA color fast", colorDarkGrey);
  colMAS = ParamColor("MA color slow", colorDarkGreen);

  styleMAF = ParamStyle("MA style fast", 0, maskDefault);
  styleMAS = ParamStyle("MA style slow", styleThick, maskDefault);

  colAreaF = ParamColor("Area color fast", colorBrightGreen);
  colAreaS = ParamColor("Area color slow", colorPaleGreen);

  showArea = ParamToggle("Show area", "No|Yes", 1);
  
  bbTopF = BBandTop(P, PeriodsF, WidthF);
  bbBottomF = BBandBot(P, PeriodsF, WidthF);
  bbMiddleF = MA(P, PeriodsF);

  bbTopS = BBandTop(P, PeriodsS, WidthS);
  bbBottomS = BBandBot(P, PeriodsS, WidthS);
  bbMiddleS = MA(P, PeriodsS);

  Plot(bbTopF, "BBTopFast" + _PARAM_VALUES(), colBoxF, styleBoxF | styleNoLabel); 
  Plot(bbBottomF, "BBBotFast" + _PARAM_VALUES(), colBoxF, styleBoxF | styleNoLabel); 
  Plot(bbMiddleF, "BBMiddleFast" + _PARAM_VALUES() , colMAF, styleMAF | styleNoLabel);

  Plot(bbTopS, "BBTopSlow" + _PARAM_VALUES(), colBoxS, styleBoxS | styleNoLabel); 
  Plot(bbBottomS, "BBBotSlow" + _PARAM_VALUES(), colBoxS, styleBoxS | styleNoLabel); 
  Plot(bbMiddleS, "BBMiddleSlow" + _PARAM_VALUES() , colMAS, styleMAS | styleNoLabel);


  if (showArea)
  {
    PlotOHLC(bbTopF, bbTopF, bbBottomF, bbBottomF, "", colAreaF, styleCloud);
    PlotOHLC(bbTopS, bbTopS, bbBottomS, bbBottomS, "", colAreaS, styleCloud);
  }
_SECTION_END();

1 comments

1. bobylam
over 15 years ago

you can take Hurst bands here:

http://www.wisestocktrader.com/indicators/1275-hurst-bands

Leave Comment

Please login here to leave a comment.