SM:=MA(CLOSE,IF(BARSSINCE(CLOSE>0)<21,BARSSINCE(CLOSE>0),21));
SM1:=MA(CLOSE,IF(BARSSINCE(CLOSE>0)<35,BARSSINCE(CLOSE>0),35));
SM2:=MA(CLOSE,IF(BARSSINCE(CLOSE>0)<135,BARSSINCE(CLOSE>0),135));
ZFA:=(CLOSE/REF(CLOSE,1)-1)*100;
ZFB:=(CLOSE/OPEN-1)*100;
ZF:MAX(ZFA,ZFB),NODRAW;
K:=(SM2-SM1)*100/SM1;
KJ:=(SM1-SM2)*100/SM2;
KK:=(CLOSE-SM1)*100/SM1;
KE:=(CLOSE-SM2)*100/SM2;
A1:=HHV(ZF,3);
A2:=HHV(ZF,5);
A3:=HHV(ZF,8);
A4:=HHV(ZF,13);
A5:=HHV(ZF,21);
A7:=HHV(ZF,34);
A8:=HHV(ZF,89);
A6:=REF((A1+A2+A3+A4+A5+A7)/6,1);
选股:IF(FILTER(BARSLAST(CROSS(SM1,SM2))<=8 OR BARSLAST(CROSS(CLOSE,SM1) AND CROSS(CLOSE,SM2))<=8 OR (ABS(K)<=15 AND SM1>REF(SM1,1) AND HIGH*1.02>SM2 AND KK<23 AND KE<26) AND KE<40 AND ZF>=ZFX AND ZF>A6,13),ZF,0),COLORGREEN,LINETHICK2;
{-----------------------------------}