variable:n=100;
if 平多条件 and holding>0 then begin
sell(1,0,market);
if numprofit(1)>0 then n:=100;
if numprofit(1)<0 then n:=n*1.2;
end
if 平空条件 and holding<0 then begin
sellshort(1,0,market);
if numprofit(1)>0 then n:=100;
if numprofit(1)<0 then n:=n*1.2;
end
n为下单手数