{ 取消的股票}
T1:=IF(NAMELIKE('ST'),0,1) AND IF(NAMELIKE('*'),0,1);
T2:=NOT(CODELIKE('688'));
T3:=NOT(CODELIKE('300'));
T4:=NOT(CODELIKE('4'));
T5:=NOT(CODELIKE('8'));
T6:=NOT(INBLOCK('近期解禁'));
T7:=NOT(INBLOCK('拟减持'));
TT:=T1 AND T2 AND T4 AND T5 AND T6 AND T7 ;
{均线}
A1:=MA(C,5); {5日均线}
A2:=MA(C,10) ; {10日均线}
A3:=MA(C,20) ; {20日均线}
A4:=MA(C,30) ; {30日均线}
A5:=MA(C,60) ; {60日均线}
A11:=A1 REF(A1,1); {5日均线大于1日前的5日均线};
A12:=A2 REF(A2,1); {10日均线大于1日前的10日均线}
A13:=A3 REF(A3,1); {20日均线大于1日前的20日均线}
A14:=A4 REF(A4,1); {30日均线大于1日前的30日均线}
A15:=A5 REF(A5,1); {60日均线大于1日前的60日均线}
A16:=crOSS(A1,A2); {5日均线上穿10日均线}
A17:=CROSS(A2,A3); {10日均线上穿20日均线}
A18:=REF(A1,1) REF(A2,1); {1日前的5日均线 1日前的10日均线}
A19:=A1 {5日均线 10日均线}
AA:=A11 AND A12 AND A19;
{macd指标 }
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MacD:=(DIF-DEA)*2;
B1:=DIF-(REF(DIF,1)) 0.03; {DIF-1日前的DIF 0.03}
B2:=DIF REF(DIF,1); {DIF 1日前的DIF}
B3:=DEA-(REF(DEA,1)) 0.05; {DEA-1日前的DRA 0.05}
BB:=B1 AND B3;
{skdj指标 }
LOWV:=LLV(LOW,9);
HIGHV:=HHV(HIGH,9);
RSV:=EMA((CLOSE-LOWV)/(HIGHV-LOWV)*100,3);
SkdjK:=EMA(RSV,3);
SkdJD:=MA(SKDJK,3);
C1:=REF(SKDJK,1) {1日前的SKDJK 20}
C2:=SKDJK REF(SKDJK,1); {SKDJK大于1日前的SKDJK}
C3:=REF(SKDJD,1) {1日前的SKDJD 20}
C4:=SKDJD REF(SKDJD,1); {SKDJD大于1日前的SKDJD}
C5:=SKDJD-REF(SKDJD,1) {SKDJD-1日前的SKDJD 1}
CC:=C2 AND C5 ;
{ KDJ指标 }
RSE:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
KDJK:=SMA(RSE,3,1);
KDJD:=SMA(KDJK,3,1);
KDJJ:=3*KDJK-2*KDJD;
D1:=KDJK REF(KDJK,1); {KDJK大于1日前的KDJK}
D2:=REF(KDJJ,1) {1日前的KDJJ 20}
D3:=KDJJ REF(KDJJ,1); {KDJJ大于1日前的KDJJ}
D4:=KDJJ-REF(KDJJ,1) {KDJJ-1日前的KDJJ 7}
DD:=D3 AND D4;
{rsi指标 }
LC:=REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(Abs(CLOSE-LC),6,1)*100;
RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;
RSI3:=SMA(MAX(CLOSE-LC,0),24,1)/SMA(ABS(CLOSE-LC),24,1)*100;
E1:=REF(RSI1,1) {1日前的RSI1 20}
E2:=RSI1 REF(RSI1,1); {RSI1大于1日前的RSI1}
E3:=RSI2 REF(RSI2,1); {RSI2大于1日前的RSI2}
EE:= E2 AND E3;
{dmi指标 }
MTR:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),14);
HD:=HIGH-REF(HIGH,1);
LD:=REF(LOW,1)-LOW;
DMP:=SUM(IF(HD 0 HD LD,HD,0),14);
DMM:=SUM(IF(LD 0 LD HD,LD,0),14);
pdi:=DMP*100/MTR;
mdi:=DMM*100/MTR;
ADX:=MA(ABS(MDI-PDI)/(MDI+PDI)*100,6);
ADXR:=(ADX+REF(ADX,6))/2;
F1:=PDI REF(PDI,1); {PDI大于1日前的PDI }
F2:=REF(PDI,1) REF(MDI,1); {1日前的PDI 1日前的MDI}
F3:=PDI {当前PDI大于当前MDI }
F4:=CROSS(PDI,MDI); {PDI上穿MDI }
F5:=PDI-REF(PDI,1) {PDI-1日前的PDI 7 }
F6:=MDI REF(MDI,1); {MDI大于1日前的MDI }
FF:=F3 AND F5;
{cci指标 }
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,14))*1000/(15*AVEDEV(TYP,14));
G1:=CCI {CCI -50 }
G2:=CCI REF(CCI,1); {CCI大于1日前的CCI }
G3:=CCI-REF(CCI,1) {CCI-1日前的CCI 30 }
GG:= G3 ;
{vol指标 }
VOLUME:=VOL;
MAVOL1:=MA(VOLUME,5);
MAVOL2:=MA(VOLUME,10);
MAVOL3:=MA(VOLUME,60);
H1:=MAVOL1 REF(MAVOL1,1); {MAVOL1大于1日前的MAVOL1 }
H2:=MAVOL2 REF(MAVOL2,1); {MAVOL2大于1日前的MAVOL2 }
H3:=VOLUME REF(VOLUME,1); {VOLUME大于1日前的VOLUME }
HH:=H1 AND H2 AND H3;
XG:AA AND BB AND CC AND DD AND EE AND FF AND GG AND TT AND HH ;