RSV:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;
K1:=SMA(RSV,3,1);
D1:=SMA(K1,3,1);
KK:=INTPART(K1);
DD1:=INTPART(D1);
TFXXS:=KK+DD1;{变异KD风险系数}
TGLXS:=(TFXXS-REF(TFXXS,1));{变异KD乖离系数:资金流向}
ZLCM:=EMA(WINNER(CLOSE)*70,3);{主力筹码估算}
SHCM:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3);{散户筹码估算}
ZSHTL:=SHCM/(ZLCM+SHCM)*100;{散户套牢筹码系数}
ZZLKP:=ZLCM/(ZLCM+SHCM)*100;{主力控盘筹码系数}
粉色:=ZZLKP>REF(ZZLKP,1) AND ZZLKP>20;
红:=TGLXS>0 AND TGLXS>REF(TGLXS,1) AND 粉色;
亮红:=ZZLKP>REF(ZZLKP,1) AND ZZLKP<20;
深蓝:=ZZLKP<=REF(ZZLKP,1) AND ZZLKP<20;
实体:=MAX(OPEN,CLOSE)-MIN(OPEN,CLOSE);
攻防价位:=REF(实体*0.618+MIN(OPEN,CLOSE),1);
{通达信去掉*、S、ST}
S2:=IF(NAMELIKE('S'),0,1);
S3:=IF(NAMELIKE('*'),0,1);
{通达信去掉停牌}
S4:=DYNAINFO(17)>0;
S5:=REF(C,1)<40;
SS:=C>攻防价位 AND S2 AND S3 AND S4 AND S5;
FILTER(COUNT(深蓝,3)>0 AND 红 AND SS,3),COLORRED;