{1》kdj死叉 空开仓 金叉 空平仓 。
2》成交之后以成交价为准自动止损5个点,止赢10个点。
3》下午2:55之前强行平仓}
k:stkindi('','kdj.k',0,1);
d:stkindi('','kdj.d',0,1);
t1:=time<145500;
t2:=time>=145500;
if cross(d,k) and t1 then buyshort(holding=0,1,thisclose);
if cross(k,d) and t1 then sellshort(1,0,market);
if t1 and h>enterprice+5*mindiff and enterbars>0 then sellshort(1,0,market);//止损
if t1 and l<enterprice-10*mindiff and enterbars>0 then sellshort(1,0,market);//止盈
if t2 then sellshort(1,0,market);// 强平
谢谢老师的答复,我是新人第一次接触程序化交易,真心谢谢老师!!我试试看看能不能行。再次真心谢谢老师!