AA:=C/REF(C,1)>1.04 AND REF(MA(C,250)/MA(C,120)<1.15,1) AND REF(COUNT(MAX(C,O)/MIN(C,O)<1.02,10)>7,1) AND REF(C,1)/REF(LLV(L,700),2)<1.5 AND REF(EVERY(MA(C,60)/REF(MA(C,60),1)>0.995,10) AND EVERY(MA(C,120)/REF(MA(C,120),1)>0.998,10),1);
BB:=NOT(REF(EVERY(MA(C,60)/MA(C,120)<0.93,100),1)) AND REF(EVERY(MAX(MA(C,60),MA(C,120))/MIN(MA(C,60),MA(C,120))<1.08,8),1) AND (REF(C,1)/REF(MA(C,20),1)<1.04 OR REF(C,1)/REF(MA(C,60),1)<1.04) AND V/REF(V,1)>3 AND V>REF(HHV(V,35),1);
VAR1:=EMA(C,30)*1.09;
TYP:=(HIGH+LOW+CLOSE)/3;
VAR3:=(TYP-MA(TYP,38))*1000/(15*AVEDEV(TYP,38));
XG:=REF(EVERY(C<VAR1,10) AND EVERY(MA(C,60)>MA(C,120),4),1) AND C>VAR1 AND MA(C,60)>MA(C,120) AND V/REF(V,1)>1.2 AND REF(C,1)/REF(C,2)<1.08 AND REF(C,2)/REF(C,13)<1.07 AND C>REF(HHV(H,30),1) AND MA(C,20)/MA(C,250)<1.4 AND VAR3>140;
A1:=REF(AA AND BB,1) AND XG;
A2:=AA AND BB AND REF(XG,1);
A3:=XG AND AA AND BB;
XGZ:=A1 OR A2 OR A3;
STICKLINE(XGZ,0,1,3,0),COLORRED;
STICKLINE(XGZ,1,2,2,0),COLORMAGENTA;
STICKLINE(XGZ,2,3,1,0),COLORYELLOW;
DRAWTEXT(XGZ,2.5,' ★★★★★ 机构牛'),COLORYELLOW;