{通达信去掉*、S、ST}
S2:=IF(NAMELIKE('*'),0,1);
S3:=IF(NAMELIKE('S'),0,1);
{通达信去掉停牌}
S4:=DYNAINFO(17)>0;
{均线粘合}
MA5:=MA(C,5);
MA10:=MA(C,10);
MA20:=MA(C,20);
MA30:=MA(C,30);
MA60:=MA(C,60);
MAX_MA:=MAX(MA5,MAX(MA10,MAX(MA20,MA30)));
MIN_MA:=MIN(MA5,MIN(MA10,MIN(MA20,MA30)));
粘合度:=(MAX_MA-MIN_MA)/MIN_MA*100;
{均线角度}
角度MA5:=ATAN((MA5/REF(MA5,1)-1)*100)*180/3.1416;
角度MA10:=ATAN((MA10/REF(MA10,1)-1)*100)*180/3.1416;
角度MA20:=ATAN((MA20/REF(MA20,1)-1)*100)*180/3.1416;
角度MA30:=ATAN((MA30/REF(MA30,1)-1)*100)*180/3.1416;
角度MA60:=ATAN((MA60/REF(MA60,1)-1)*100)*180/3.1416;
X1:=粘合度<=5;
X2:=角度MA5>0 AND 角度MA10>0 AND 角度MA20>0 AND 角度MA60>0;
X3:=V/MA(V,5)>1.5;
XG:X1 AND X2 AND X3;