GL:=IF(NAMELIKE('ST') OR NAMELIKE('*ST'),0,1) AND IF(CODELIKE('688'),0,1);
JJ:=(H+L+C)/3;
AD0:=vol/IF(H=L,4,H-L);
J:="kdj.J";
AD1:=IF(CAPITAL=0,AD0*(JJ-MIN(C,O)),AD0*(MIN(O,C)-L));
AD2:=IF(CAPITAL=0,AD0*(MIN(O,C)-L),AD0*(JJ-MIN(C,O)));
AD3:=AD0*(H-MAX(O,C));
AD4:=AD0*(MAX(C,O)-JJ);
AD5:=AD1+AD2;
AD6:=AD3+AD4;
YF:=(AD5-AD6)/(AD5+AD6)*100;
YF1:=((AD1+AD2)-(AD3+AD4))/SUM(VOL,10)*100;
YF2:=YF*17;
YF3:=((AD2+AD4)-(AD1+AD3))/SUM(VOL,10)*100;
XG1:=crOSS(J,0) AND ((YF1>0 AND YF3>0) OR YF2>400);
VAR1:=LLV(LOW,13);
VAR2:=HHV(HIGH,13);
VAR3:=SMA((CLOSE-VAR1)/(VAR2-VAR1)*100,5,1);
VAR4:=SMA((VAR2-CLOSE)/(VAR2-VAR1)*100,5,1);
VAR5:=SMA(MAX(CLOSE-REF(CLOSE,1),0),5,1)/SMA(Abs(CLOSE-REF(CLOSE,1)),5,1)*100;
XG2:=CROSS(EMA(VAR5,3), VAR3) AND VAR4>65;
XG3:=CROSS(0.9,1/VOL*1000>0.01 AND "kdJ.J"<0);
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
macd:=(DIF-DEA)*2;
XG4:=MACD>REF(MACD,1);
XG:=XG1 AND XG2 AND XG3 AND C>REF(C,1) AND GL AND XG4;
DRAWTEXT(XG=1,1,' 小试'),COLORYELLOW;