variable:duo_yl=0,kong_yl=0,quan_yl;
variable:duo_ks=0,kong_ks=0,quan_ks;
if 平多条件 and holding>0 then begin
sell......;
kong_yl:=0;
kong_ks:=0;
if numprofit(1)>0 then begin
duo_yl:=duo_yl+1;
quan_yl:=quan_yl+1;
quan_ks:=0;
duo_ks:=0;
end
if numprofit(1)<0 then begin
duo_ks:=duo_ks+1;
quan_ks:=quan_ks+1;
quan_yl:=0;
duo_yl:=0;
end
end
if 平空条件 and holding<0 then begin
sellshort.........;
duo_ks:=0;
duo_yl:=0;
if numprofit(1)>0 then begin
kong_yl:=kong_yl+1;
quan_yl:=quan_yl+1;
quan_ks:=0;
kong_ks:=0;
end
if numprofit(1)<0 then begin
kong_ks:=kong_ks+1;
quan_ks:=quan_ks+1;
quan_yl:=0;
kong_yl:=0;
end
end
近期空头连亏:kong_ks;
近期空头连赢:kong_yl;
近期多头连亏:duo_ks;
近期多头连赢:duo_yl;
近期总体连亏:quan_ks;
近起总体连赢:quan_yl;
整体最大空头连亏:hhv(kong_ks,0);
整体最大空头连赢:hhv(kong_yl,0);
整体最大多头连亏:hhv(duo_ks,0);
整体最大多头连赢:hhv(duo_yl,0);
整体最大总体连亏:hhv(quan_ks,0);
整体最大总体连赢:hhv(quan_yl,0;