TS Aberration

Da traderpedia.
Versione del 14 mar 2012 alle 22:01 di imported>Alberto Bellemo
(diff) ← Versione meno recente | Versione attuale (diff) | Versione più recente → (diff)
Jump to navigation Jump to search

Trading System "Aberration"

Formula per Tradestation:

INIZIO FORMULA

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;

FINE FORMULA

Vedi anche: