HH:MA(C,X),LINETHICK2,COLORBLUE;
H1:eMA(C,N),LINETHICK2,COLORWHITE;
H2:eMA(H1,M),LINETHICK2,COLORYELLOW;
zx:ema(h2,k),linethick3,colorred;
KD:=(zx>ref(zx,1) and cross(h1,h2)) or (zx>ref(zx,1) and cross(c,h2)) OR cross(c,HH); //开多条件
PD:=(zx<ref(zx,1) and cross(h2,h1)) or (zx<ref(zx,1) and cross(h2,c)) OR cross(HH,c); //平多条件
KK:=(zx<ref(zx,1) and cross(h2,h1)) or (zx<ref(zx,1) and cross(h2,c)) OR cross(HH,c); //开空条件
PK:=(zx>ref(zx,1) and cross(h1,h2)) or (zx>ref(zx,1) and cross(c,h2)) OR cross(c,HH); //平空条件
if time>090000 then begin
平空:SELLSHORT(PK,N,THISCLOSE); //平空信号
开多:BUY(KD,N,THISCLOSE); //开多信号
平多:SELL(PD,N,THISCLOSE); //平多信号
开空:BUYSHORT(KK ,N,THISCLOSE); //开空信号
end
PARTLINE(zx<ref(zx,1),zx ,colorgreen ,linethick3);
STICKLINE(H1>H2,H1,H2,1,0.8),COLORRED;
STICKLINE(H1<H2,H1,H2,1,0.8),COLORGREEN;
DRAWTEXT(cross(h1,h2) ,h1 ,'买入' ,COLORRED );
DRAWTEXT(cross(h2,h1) ,h1 ,'卖出' ,COLOrgreen );
UPPER: h2 + P*STD(CLOSE,nn);
LOWER: h2 - P*STD(CLOSE,nn);
麻烦给看一下交易语句有什么问题没?
在交易软件上信号显示和我设想的不一样,在软件上只显示平空,开空