variable:n=0;
if holding>0 and 平多条件 then begin
sell(1,0,marektr);
if numprofit(1)>=0 then n:=0;
if numprofit(1)<0 then n:=n+1;
end
if holding<0 and 平空条件 then begin
sellshort(1,0,marektr);
if numprofit(1)>=0 then n:=0;
if numprofit(1)<0 then n:=n+1;
end
然后开仓条件就是: n=10
把marketr改成nextopen