ma10:=ma(close,10);ma20:=ma(close,20);t1:=cross(close,ma20);t2:=low/ma10>=0.98 or low/ma10<=1.02;t3:=barslast(t1)<=5;xg:t2 and t3;注:突破20日均线的时间设为前5天内有突破信号。
a1:=ref(hhv(h,120),10);a3:=(c-ref(c,1))/ref(c,1)*100;a4:=ma(c,5);a5:=ref(hhv(h,10),1);h>a1 and ref(h,1)<a1 and h>a5 and ref(h,1)<a5 and o>ref(c,1) and a3<4 and count(c>a4,3)=3;