if DYNAINFO2(7, PZ1)<=enterprice-8*MINDIFF then begin//多损
tsell(1,1,MKT,0);
end;
if DYNAINFO2(7, PZ1)>=enterprice+5*MINDIFF then begin//多盈
tsell(1,1,MKT,DYNAINFO2(7, PZ1),0);
end
if DYNAINFO2(7, PZ1)>=enterprice+8*MINDIFF then begin//空损
tsellshort(1,1,MKT,DYNAINFO2(7, PZ1),0);
end
if DYNAINFO2(7, PZ1)<=enterprice-5*MINDIFF then begin //空盈
tsellshort(1,1,MKT,DYNAINFO2(7, PZ1),0);
end
if DYNAINFO2(7, PZ1)<=o-4*mindiff and tbuyholdingex(ZH,pz1,0)=0 and tsellholdingex('',pz1,0)=0 then begin//开空
tbuyshort(1,1,MKT,DYNAINFO2(7, PZ1),0);
end
if DYNAINFO2(7, PZ1)>=o+4*mindiff AND tbuyholdingex('',pz1,0)=0 and tsellholdingex('',pz1,0)=0 then begin //开多
tbuy(1,1,MKT,DYNAINFO2(7, PZ1),0);
end