在Tradestation下
Input: 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 Long--------}
if (MarketPosition=1) and (Close < Ave) then
ExitLong("LX") today at Close;
{--------Exit Short--------}
if (MarketPosition=-1) and (Close > Ave) then
ExitShort("SX") today at Close;
========================
Parameter: Length(35), 標準差(2) ;
VARS:均線(0),上(0),下(0) ;
IF NOT(high=low) then
均線 = MA(C,Length)
Value1 = StdDev(C,Length)
上 = 均線 + 標準差*Value1
下 = 均線 - 標準差*Value1
IF C CROSS OVER 上 THEN
BUY NEXT BAR AT MARKET
END IF
IF C CROSS UNDER 下 THEN
SELL NEXT BAR AT MARKET
END IF
IF C < 均線 THEN
EXITLONG THIS BAR AT CLOSE
END IF
IF C > 均線 THEN
EXITSHORT THIS BAR AT CLOSE
END IF
END IF
你不把交易思想说清楚是没人会帮你改交易系统的,因为我们都不懂Tradestation