if 开多条件 then begin
tbuy(tholding=0,1,lmt,c);
tsell(1,0,lmt,c+8*mindiff);
end
if 平空条件 then begin
tcancel(1,2);
tsell(1,0,mkt);
end
if 开空条件 then begin
tbuyshort(tholding=0,1,lmt,c);
tsellshort(1,0,lmt,c-8*mindiff);
end
if 平空条件 then begin
tcancel(1,4);
tsellshort(1,0,mkt);
end