条件是: 1: 横盘3天或以上 2: 振幅在8个点以内 3: 横盘时每天的收盘价在前面涨停板价附近,不能小于5日线
爱约股解答:
m5:=ma(c,5);
c1:=ref(c,1);
st:=namelike('st')||namelike('*st')||namelike('sst');
zt:=1.1*c1-c<0.005&&(1.05*c1-c<0.005&&st);
ztyl:=barslast(zt);
zgj:=hhv(h,ztyl);
zdj:=llv(l,ztyl);
zf:=zgj/zdj;
tj1:=ztyl>=3;
tj2:=zf<=1.08;
tj3:=count(c<1.06*ref(c,ztyl),ztyl)=ztyl &&count(c>m5,ztyl)=ztyl;
xg:tj1&&tj2&&tj3;