variable:m=0;
if 平多条件 and holding>0 then begin
sell(1,0,marketr);
if numprofit(1)>0 then m:=m+1;
end
if 平空条件 and holding<0 then begin
sellshort(1,0,marketr);
if numprofit(1)>0 then m:=m+1;
end
c1:=平多条件 and holding<> ref(holding,1);
c2:=平空条件 and holding<> ref(holding,1);
nn:=sumbars(c1 or c2,100);
胜率:(m-ref(m,nn))/100;