VARIABLE:n=0;if date<>ref(date,1) then n:=0;if 条件A then n:=1;ss:barslast(n=1 and ref(n,1)=0);
ss就是当天条件a成立到当前的周期数