[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: GEN Bollinger Bands



PureBytes Links

Trading Reference Links

Here is the easy language code for the %b and BBandwidth.
BobR

-------------------------------------------------------------
{Percent b tells you where you are in the bands
%b = (close - lower band)/(upper band - lower band)}

Inputs:  Price(close), Length(20),StdDevUp(2), StdDevDn(-2);

Value1 = BollingerBand(Price,Length,StdDevUp);
Value2 = BollingerBand(Price,Length,StdDevDn);

Value3 = Value1-Value2;

Value4 = (Close - Value2)/Value3;

Plot1(Value4,"%b");
Plot2(0,"0");
Plot3(1,"1");
--------------------------------------------------------

Bollenger Bandwidth
-----------------------------------------------------------
{BBand Width tells you how wide the bands are as a function of the average.
 Levels of 2% lead to explosive moves.  Decreasing bandwidth means
decreasing volatility and vice versa.  BandWidth  = (UPPER BAND - LOWER
BAND)/MIDDLE BAND}

Inputs:  Price(close), Length(20),StdDevUp(2), StdDevDn(-2), Ref(0.01);

Value1 = BollingerBand(Price,Length,StdDevUp);
Value2 = BollingerBand(Price,Length,StdDevDn);

Value3 = Value1-Value2;

Value4 =( Value1+Value2)/2;

Value5 =Value3/Value4;

Plot1(Value5,"BBwidth");
Plot2(Ref,"0");
----------------------------------------
BobR

At 06:34 AM 6/27/97 +0200, Gaetano A. Evangelista wrote:
>>Thanks for your reply and offer.  This seems very interesting and if you
>>would like to email me the code for both the bandwidth and %BB I will try
>>to convert it to EL for TS.  Many thanks and I will put your name on my
>>list for any useful followup that comes from my work.  In the meantime ....
>>Happy Trading!
>
>ciao Ron,
>here is the BBW and %B code for Equis Metastock 4.5:
>
>Bollinger bands width
>    100*(4*std(C,20))/(mov(C,20,S))
>
>Bollinger %B
>    100*(C-(mov(C,20,S)-(2*std(C,20))))/(4*std(C,20))
>
>Let me know how your work progress! :-)
>
>
>
>
>
>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>Gaetano Arnaldo Evangelista - BARI (Italy)
>E-mail: ageitaly@xxxxxx
>URL: http://www.geocities.com/wallstreet/8492
>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>