我知道。但是差得太离谱了。我的买入系统是K线的开盘价,结果这个函数返回的值整个K线都没有这个值,高得离谱,比如焦炭今天的是1470的开盘价,结果这个函数返回值是1479,高9个点,怎么会有设置好的止损出现呢。
如果不用这个函数,止损该怎么写?
http://www.weistock.com/bbs/dispbbs.asp?boardid=2&Id=31614&page=3
论坛贴图方式,大小不要超过100k
感谢。在QQ客服的指导下,我发现我的开仓价显示的是上一次开仓的价格。所以价格有偏差,客服给我写的交易代码就是正确的,但我实在找不出怎么会显示成了上一次的开仓价,请客服帮我看看
这个是你们给我写的
if c>o then begin
sellshort(holding<0,holding,limitr,open);
buy(holding=0,1,limitr,open);
end
if c<o then begin
sell(holding>0,holding,limitr,open);
buyshort(holding=0,1,limitr,open);
end
这个是我的交易条件
zm:"zm.zm#MIN5",LINETHICK0;
zk:"zk.zk#MIN5",LINETHICK0;
jz:"jz.jz#MIN5",LINETHICK0;
RSV:=(CLOSE-LLV(LOW,n1))/(HHV(HIGH,n1)-LLV(LOW,n1))*100;
G:=SMA(RSV,n2,1);
D:=SMA(G,n3,1);
J:=3*G-2*D;
委托价:enterprice,LINETHICK0;
KD:=(time>090000 and time<145900) and ( (zm=1 AND ref(J,1)<11) or (zk=1 AND ref(J,1)<11)) ; //开多条件
PD:= (time=145900) or ( (zm=0 ) and (zk=0 )); //平多条件
KK:=(time>090000 and time<145900) and ((zm=1 AND ref(J,1)>100)or (zk=1 AND ref(J,1)>53) or (JZ=1 and ref(J,1)>31) ); //开空条件
PK:= (time=145900) or ( (zm=0 ) and (jz=0) and (zk=0 )) ; //平空条件
SELLshort((close-ENTERPRICE>1 and holding<>0) ,holding,LIMITR,open);
SELLSHORT((PK=1 ) ,holding,LIMITR,open); //平空信号
SELL((ENTERPRICE-close>1 and holding<>0) ,holding,LIMITR,open);
SELL((PD=1) ,holding,LIMITR,open); //平多信号
BUY(kd=1 AND HOLDING=0,10,LIMITR,open);
//开多信号
//开空信号
BUYSHORT(KK=1 AND HOLDING=0,10,LIMITR,open);
这个难道会和调用的数值有关?那只是个信号调用,0和1而已。。。