{KKD}
P1:=5;
P2:=4;
VARA:=LLV(LOW,P1);
VARB:=HHV(HIGH,P1);
K: EMA((CLOSE-VARA)/(VARB-VARA)*100,P2),COLORRED;
D: EMA(0.667*REF(K,1)+0.333*K,2),COLORWHITE;
{选股指标}
P1:=5;
P2:=4;
VARA:=LLV(LOW,P1);
VARB:=HHV(HIGH,P1);
K:=EMA((CLOSE-VARA)/(VARB-VARA)*100,P2);
D:=EMA(0.667*REF(K,1)+0.333*K,2);
XG:crOSS(K,D)AND D<40,COLORRED;