N:=9;
M1:=3;
M2:=3;
HH:=HHV(H,N);
LL:=LLV(L,N);
F:=(HH-LL)/100;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,M1,1);
D:=SMA(K,M2,1);
●K:K*F+LL,COLORWHITE;
●D:D*F+LL,COLORYELLOW;
●J:3*●K-2*●D,COLORFF00FF;
DI:=FILTER(CROSS(20,K),10);
DING:=FILTER(CROSS(K,80),10);
DDI:=FILTER(CROSS(10,K),10);
DDING:=FILTER(CROSS(K,90),10);
GD1:=BARSLAST(CROSS(80,K));
DD1:=BARSLAST(CROSS(K,20));
DRAWTEXT(DI,L,'●入底'),COLORWHITE;
DRAWTEXT(DDI,L,'●大底'),COLORYELLOW;
DRAWTEXT(DING,H,'●入顶'),COLOR00FF00;
DRAWTEXT(DDING,H,'●大顶'),COLORFFFF00;
JC:=CROSS(K,D) AND K< 20;
D1:=JC AND GD1>0 AND COUNT(CROSS(K,D),GD1)=1;
DRAWICON(D1,L,1);
SC:=CROSS(D,K) AND K>80;
D2:=SC AND DD1>0 AND COUNT(CROSS(D,K),DD1)=1;
DRAWICON(D2,H,2);