Band Width indicator

Kant-en-klare, geteste indicatoren en handelssystemen
Plaats reactie
Berichten: 3332
Lid geworden op: za sep 10, 2005 2:41 am
Locatie: Den Haag

Band Width indicator

Bericht door Eric »

Band Width Indicator: created by John Bollinger, presented by John Forman in the NOv.1994 issue of "Technical Analysis of Stocks and Commodities".

Idea: BWI is a measure of a tradeable's ability/tendency to trend. It is faster than an ADX, in that it will move earlier and reset itself earlier too. When the BWI is low, there is low, there isn't any trend...When it has a positive slope, there is a trend.

Code: Selecteer alles

{- Filename: Band Width -}

  Periode, i: integer;
  OBFactor, OSFactor,
  OBBand, OSBand: real;
  sMA, sSDEV, sBWI: TSeries;
{ Indicator parameters }
  Periode := CreateParameterInteger('BWI periode', 1, 999, 13, true);
  OBFactor := CreateParameterReal('Overbought factor', 1, 999, 2, true);
  OSFactor := CreateParameterReal('Oversold factor', 1, 999, 2, true);

{ Indicator eigenschappen }
  with Indicator do 
    ShortName := 'BWI';
{ Aantal benodigde koersen om eerste indicatorwaarde te berekenen }
    RequiredBars := Periode;

  sMA := MA(Close, maSimple, Periode);
  sSDEV := StdDev(Close, Periode);
  sBWI := CreateSeries(BarCount);
  for i:=FirstValidIndex(sMA) to BarCount-1 do
    OBBand := sMA[i] + OBFactor * sSDEV[i];
    OSBand := sMA[i] - OSFactor * sSDEV[i];
    sBWI[i] := (OBBand - OSBand) / sMA[i];
  with CreateLine(sBWI) do
    Name := 'BWI';
    Color := clLime;
    LineContent := lcTAR;
Plaats reactie