//假设我开仓10手,当未成交委托单超过10秒,则撤单,若价格变动在5个最小变动范围之内,则以对手价继续追单,直到10手全部成交,请帮我写下这个代码
if TSUBMIT( 1)>10 then begin
tcancel(1,1);
if abs(TORDERPRICE( 1,1 )-dynainfo(7))<=5*mindiff then tbuy(1,10,lmt,DYNAINFO( 34));
end
if TSUBMIT(2)>10 then begin
tcancel(1,2);
if abs(TORDERPRICE( 2,1 )-dynainfo(7))<=5*mindiff then tsell(1,10,lmt,DYNAINFO( 28));
end
if TSUBMIT( 3)>10 then begin
tcancel(1,3);
if abs(TORDERPRICE( 3,1 )-dynainfo(7))<=5*mindiff then tbuyshort(1,10,lmt,DYNAINFO( 28));
end
if TSUBMIT(4)>10 then begin
tcancel(1,4);
if abs(TORDERPRICE( 4,1 )-dynainfo(7))<=5*mindiff then tsellshort(1,10,lmt,DYNAINFO( 34));
end