Type : Function, Name: $Lowerband
Input:
Price(NumericSeries),
Length(NumericSimple),
SDev(NumericSimple);
$Lowerband = Average(Price, Length) — StdDev(Price, Length) * SDev
Type : Function, Name: $Upperband
Input:
Price(NumericSeries),
Length(NumericSimple),
SDev(NumericSimple);
$Upperband = Average(Price, Length) + StdDev(Price, Length) * SDev
Type : Indicator, Name: $%B I
Input:
Price(C),
Length(18),
SDev(2); Vars:
Upper(0),
Lower(0),
Where(0);
Upper = 100 * (Price — $Lowerband(Price, Length, SDev));
Lower = $Upperband(Price, Length, SDev) — $Lowerband(Price, Length,
SDev);
If Lower <> 0 Then
Where = ((Upper / Lower) — 50) * 2;
Plot1(Where, «Where»);
Plot2(100,»Upper»);
Plot3(-100,»Lower»);