variable:ss=0;
variable:tt=0;
variable:n=0;
variable:m=0;
ma10:=ma(c,10);
if 开仓条件 and 持仓判断 then begin
buy......;
ss:=ss+1;
if enterprice>ma10 then n:=n+1;
end
在10日均线上的比率:n/ss;
if 平仓条件 and 持仓判断 then begin
sell....;
tt:=tt+1;
if enterprice>ma10 and numprofit(1)>0 then m:=m+1;
end
10日均线上以及盈利的比率:m/tt;