Автор:
Разместил:   Дата: 2005-09-09 09:14
Комментарии: (0)   Рейтинг:

Aberration

Type : 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;



 
Реклама:

Rambler's Top100

Страница создана за 0.031 секунды