BOLLINGER BANDS

BOLLINGER BANDS

Тype : Signal, Name : Aberration

Inputs: Length(35), StdDevUp(2.0), StdDevDn(-2.0);
Vars: UpBand(0), DnBand(0), Ave(0);
UpBand = BollingerBand(Close,Length,StdDevUp);
DnBand = BollingerBand(Close,Length,StdDevDn);

Ave = Average(Close,Length);

{ —- Enter Long —- }

if ( MarketPosition = 0 ) and ( Close > UpBand )
then Buy(«BE») tomorrow at market;

{ —- Enter Short —- }

if ( MarketPosition = 0 ) and ( Close < DnBand )
then Sell(«SE») tomorrow at market;

{ —- Exit Short —- }

if ( MarketPosition = 1 ) and ( Close < Ave )
then ExitLong(«LX») today at close;

{ —- Exit Long —- }

if ( MarketPosition = -1 ) and ( Close > Ave )
then ExitShort(«SX») today at close;

Подписаться
Уведомить о
0 комментариев
Межтекстовые Отзывы
Посмотреть все комментарии