globalvariable:lk:=0,mark:=0;
if todaybar=1 then
begin
tbuyshort(1,1,mkt);
end
if c>tavgenterpriceex2('','',1)+1*mindiff and tsellholdingex('','',2)>0 then
begin
tsellshort(1,0,mkt);
//平仓时候 对全局变量做个标记
mark:=1;
end
if tnumprofit(1)<0 and mark=1 then
begin
mark:=0;
lk:=lk+1;
debugfile('c:\r.txt','lk:%.0f',lk);
end