![](static/image/common/thnr/top_l.gif) | | ![](static/image/common/thnr/top_r.gif) | | 1。用5分钟图,6MA,30MA,60MA,120MA(加权平均线),BOLL线图,RSI,见附件
2。在急剧变化后,大仓进入,顺势而为,火中取栗。
请指教:
![](static/image/smiley/default/huh.gif) ![](static/image/smiley/default/handshake.gif) h:![](static/image/smiley/default/biggrin.gif)
VT交易系统
{Control Error}
ERR:= (PerMAs=0 or PerMAm=0 or PerMAl=0 or PerMAf=0 or Close=0) or
(PerMAs>PerMAm or PerMAm>PerMAl or PerMAl>PerMAf or PerMAs>PerMAf);
{Moving Average}
MS := Mov (Close, PerMAs, W);
MM := Mov (Close, PerMAm, W);
ML := Mov (Close, PerMAl, W);
MF := Mov (Close, PerMAf, W);
{Keltner Channels}
UKband := Mov( TP(), PerMAm, W) + Mov((H-L),PerMAm, W);
DMA := Mov( TP(), PerMAm, W);
LKband := Mov(TP(), PerMAm, W) - Mov((H-L),PerMAm, W);
{Bollinger Bands}
MB := Mov(Close,PerMAm, W);
UB := BLines(Close,mov(Close,PerMAm,W),PerMAm,D,0);
LB := BLines(Close,mov(CLose,PerMAm,W),PerMAm,D,1);
{Trailing Stop Loss - Level}
DeltaStop:= if(Mode=0,Wilders(ATR(14),14)*2.824, DeltaPrice);
TrStop:=If(
Close=PREV,
PREV,
If(
((Ref(Close,-1)<PREV)AND (Close<PREV)),
Min(PREV,Close + DeltaStop),
If(
(Ref(Close,-1)>PREV) AND (Close>PREV),
Max(PREV,Close - DeltaStop),
If(
Close>PREV,
Close - DeltaStop,
Close + DeltaStop
)
)
)
);
{ Relative Strength Index}
rsi_r:= (CLOSE - ref(CLOSE,-1));
rsi_rs := Wilders(if(rsi_r>0,rsi_r,0),tpr) / Wilders(if(rsi_r<0,Abs(rsi_r),0),tpr);
RS:= 100-(100/(1+rsi_rs));
{ Moving Average of Relative Strength Index}
MA1:=MOV(RS,PerMAs,E);
MA2:=MOV(RS,PerMAm,E);
{Signal Long and Short}
Long:= Cross(MS, MM) and (RS>=MA1 and MA1>=MA2)or
Cross(MS, TrStop)and (RS>=MA1 and MA1>=MA2);
Short:= Cross(MM, MS) and (RS<=MA1 and MA1<=MA2) or
Cross(TrStop, MS) and (RS<=MA1 and MA1<=MA2);
{End}
[ 本贴由 james2005 在 2005-4-15 15:38 最后修改 ] | ![](static/image/common/thnr/top_r2.gif) | ![](static/image/common/thnr/foot_l1.gif) | ![](static/image/common/thnr/foot_l3.gif) | ![](static/image/common/thnr/foot_r.gif) |
|