XG1:=REF(CLOSE,1);
XG2:=SMA(MAX(C-XG1,0),5,1)/SMA(Abs(C-XG1),5,1)*1000;
XG3:=REF(CLOSE,2);
XG4:=XG2-LLV(XG2,10);
XG5:=(MA(XG4,2)*3+XG4*13)/16;
XG6:=IF(XG5>13,MA(XG5,2),XG5)/6;
XG7:=SMA(MAX(C-XG1,0),6,1)/SMA(ABS(C-XG1),6,1)*100;
XG8:=H/REF(CLOSE,1)>1.097 AND CLOSE>OPEN AND O< MIN(MA(C,5),MIN(MA(C,10),MA(C,20))) AND C>MAX(MA(C,5),MAX(MA(C,10),MA(C,20)));
XG9:=0.5*(CLOSE+OPEN);
XG10:=BARSLAST(XG8);
XG11:=SQRT((POW((C-XG9),2)+POW((OPEN-XG9),2))/2)< 0.25;
XG12:=MIN(CLOSE,OPEN)>0.5*(REF(C,XG10)+REF(OPEN,XG10)) AND H< 1.097*REF(CLOSE,XG10);
选股:XG10<=2 AND COUNT(XG11,XG10)>=1 AND XG12;