tcd:=time>=220000 and time<=230000;//平仓不开仓时间段
最近开仓:ENTERPRICE;
KD:=REF(high>=REF(high,1),1) ;
KK:=REF(LOW<REF(LOW,1),1);
多盈:SELL(((HIGH-ENTERPRICE)>6*MINDIFF ) ,0,MARKET);
空盈:sellshort(((ENTERPRICE-low)>6*MINDIFF ) ,0,MARKET);
多损:SELL(((ENTERPRICE-low)>60*MINDIFF ) ,0,MARKET);
空损:sellshort(((HIGH-ENTERPRICE)>60*MINDIFF ) ,0,MARKET);
开多:BUY((KD AND not(tcd) AND HOLDING=0) ,手数,marketr);
开空:BUYSHORT((KK AND not(tcd) AND HOLDING=0),手数,marketr);//,orderQueue
//-----------------------------k走完平仓
abb:=(time0-timetot0(dynainfo(207))<=2) or not(islastbar);
KDP:sell(abb,0,MARKET);
KKP:sellshort(abb,0,MARKET);
日清多:sell(tcd and holding<>0,0,marketr);
日清空:sellshort(tcd and holding<>0,0,marketr);