请教各位帮忙解决一下这个问题,
variable:n=0;//记录连亏次数
variable:shoushu=1;//下单手数
if 平多条件 and 持仓判断 then begin
sell(.....);
if numprofit(1)>0 then n:=0;
if numprofit(1)<0 then n:=n+1;
end
if 平空条件 and 持仓判断 then begin
sellshort(......);
if numprofit(1)>0 then n:=0;
if numprofit(1)<0 then n:=n+1;
end
if n=3 then 手数:=2;
if n=4 then 手数:=3;
if n=5 then 手数:=4;
if n=6 then 手数:=5;