去除ST:=IF(NAMELIKE('S'),0,1) AND IF(NAMELIKE('*'),0,1);
去除北交所:=IF(CODELIKE('8'),0,1) ;
去除科创板:=IF(CODELIKE('688'),0,1);
三板市场:=IF(CODELIKE('4'),0,1);
去除停牌:=DYNAINFO(4)>0;
去除创业板:=IF(CODELIKE('300') OR CODELIKE('301') ,0,1) ;
XA1:=ABS(((3.48*CLOSE+HIGH+LOW+OPEN)/5-EMA(CLOSE,20))/EMA(CLOSE,20));
XA2:=DMA((2.15*CLOSE+LOW+HIGH+OPEN)/5,XA1);
XA3:=EMA(XA2,200)*1.26;
XA4:=EMA(XA2,200)*1.18;
XA5:=MA((LOW+HIGH+CLOSE)/3,5);
XA6:=HHV(XA5,60);
XA7:=IF(XA6>REF(XA6,1),XA6,DRAWNULL);
XA8:=CLOSE*VOL;
XA9:=EMA((EXPMA(XA8,3)/EXPMA(VOL,3)+EXPMA(XA8,6)/EXPMA(VOL,6)+EXPMA(XA8,12)/EXPMA(VOL,12)+EXPMA(XA8,24)/EXPMA(VOL,24))/4,13);
UPPR:=1.06*XA9;
TOP:=1.13*XA9;
XA10:=MIN(XA7,XA3);
XA11:=MIN(UPPR,XA3);
XA12:=MIN(XA7,XA4);
XA13:=MIN(UPPR,XA4);
XA14:=REF(CLOSE,1)*1.1-CLOSE<0.01 AND HIGH=CLOSE;
XA15:=CROSS(CLOSE,UPPR) AND XA14;
XA16:=CROSS(CLOSE,TOP) AND XA14;
XA17:=IF(REF(CLOSE,1)*1.1-CLOSE<0.01,1,0);
XA18:=DMA(AMOUNT/(89*VOL),VOL/CAPITAL);
XA19:=CLOSE>REF(HHV(CLOSE,89),1);
XA20:=DMA(AMOUNT/(89*VOL),VOL/CAPITAL);
XA21:=CROSS(CLOSE,XA20) AND XA19;
XA22:=ABS(((3.48*CLOSE+HIGH+LOW)/4-EMA(CLOSE,23))/EMA(CLOSE,23));
XA23:=DMA((2.15CLOSE+LOW+HIGH)/4,XA22);
XA24:=EMA(XA23,200)*1.118;
XA25:=EMA(XA23,200)*1.118;
XA26:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100>8;
XA27:=CROSS(CLOSE,XA24) AND XA26;
XA28:=EMA((EXPMA(XA8,23)/EXPMA(VOL,23)+EXPMA(XA8,54)/EXPMA(VOL,54)+EXPMA(XA8,108)/EXPMA(VOL,108)+EXPMA(XA8,316)/EXPMA(VOL,316))/4,34);
XA29:=1.0668*XA28;
XA30:=CROSS(CLOSE,XA29) AND REF(CLOSE,1)*1.08-CLOSE<0.008 AND CLOSE>OPEN*0.5;
XA31:=XA21 AND XA27;
XA32:=CROSS(CLOSE,XA24) AND XA26;
MA3_1:=MA(CLOSE,3);
MA5_1:=MA(CLOSE,5);
MA7_1:=MA(CLOSE,7);
MA10_1:=MA(CLOSE,10);
MA15_1:=MA(CLOSE,15);
MA20_1:=MA(CLOSE,20);
MA25_1:=MA(CLOSE,25);
MA30_1:=MA(CLOSE,30);
MA45_1:=MA(CLOSE,45);
MA60_1:=MA(CLOSE,60);
MA90_1:=MA(CLOSE,90);
MA120_1:=MA(CLOSE,120);
MA160_1:=MA(CLOSE,160);
MA200_1:=MA(CLOSE,200);
MA250_1:=MA(CLOSE,250);
HJ26:=SUM(C,H) AND H>L;
FHJ1:=MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(MA3_1,MA5_1),MA7_1),MA10_1),MA15_1),MA20_1),MA25_1),MA30_1),MA45_1),MA60_1),MA90_1),MA120_1),MA160_1),MA200_1),MA250_1);
FHJ2:=MIN(MIN(MIN(MIN(MIN(MIN(MIN(MIN(MIN(MIN(MIN(MIN(MIN(MIN(MA3_1,MA5_1),MA7_1),MA10_1),MA15_1),MA20_1),MA25_1),MA30_1),MA45_1),MA60_1),MA90_1),MA120_1),MA160_1),MA200_1),MA250_1);
RTO3TO250:=MA3_1/MA250_1*100-100;
RTOALL:=FHJ1/FHJ2*100-100;
UPGENE:=CONST(BARSCOUNT(CLOSE))/(COUNT(HJ26,BARSSINCE(HJ26)+1));
GP:=NAMELIKE('S') OR NAMELIKE('*');
HJ28:=IF(GP,REF(C,1)*1.05,REF(C,1)*1.1);
HJ29:=IF(HJ28,REF(C,1)*1.05,REF(C,1)*1.1);
LMTPRICE:=REF(C,H);
MKTCAP:=FINANCE(40)/100000000;
MRGNSTOCK:=IF(FINANCE(52)>0,100,DRAWNULL);
XZ1:=ABS(((3.48CLOSE+HIGH+LOW+OPEN)/5-EMA(CLOSE,20))/EMA(CLOSE,20));
XZ2:=DMA((2.15*CLOSE+LOW+HIGH+OPEN)/5,XZ1);
XZ3:=EMA(XZ2,200)*1.26;
XZ4:=EMA(XZ2,200)*1.18;
XZ5:=MA((LOW+HIGH+CLOSE)/3,5);
XZ6:=HHV(XZ5,60);
XZ7:=IF(XZ6>REF(XZ6,1),XZ6,DRAWNULL);
XZ8:=CLOSE*VOL;
XZ9:=EMA((EXPMA(XZ8,3)/EXPMA(VOL,3)+EXPMA(XZ8,6)/EXPMA(VOL,6)+EXPMA(XZ8,12)/EXPMA(VOL,12)+EXPMA(XZ8,24)/EXPMA(VOL,24))/4,13);
XZ10:=1.03*XZ9;
XZ11:=1.13*XZ9;
XZ12:=MIN(XZ7,XZ3);
XZ13:=MIN(XZ10,XZ3);
XZ14:=MIN(XZ7,XZ4);
XZ15:=MIN(XZ10,XZ4);
XZ16:=CLOSE/REF(CLOSE,1)>1.03 AND CLOSE=HIGH;
XZ17:=CROSS(CLOSE,XZ11) AND XZ16;
XZ31:=XA21 AND XA27;
COND1 := XA15 AND XA16;
COND2 := XA17;
COND3 := XA21;
COND4 := XA27;
COND5 := XA30;
COND6 := XA31;
COND7 := XA32;
COND8 := XZ17;
去除:去除ST AND 去除科创板 AND 去除北交所 AND 三板市场 AND 去除创业板 AND 去除停牌
AND REF(C<H,1) AND COND1 OR COND2 OR COND3 OR COND4 OR COND5 OR COND6 OR COND7 OR COND8
AND O/REF(C,1)<1.03;