N:=9;
P1:=3;
P2:=3;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,P1,1),COLORCYAN;
D:=Sma(K,P2,1),COLOR00DD00;
kdB:=BArslAst(REF(crOSS(K,D),1));
KDDB:=REF(CLOSE,KDB+1)>CLOSE AND REF(K,KDB+1)<K AND CROSS(K,D);
K底背:=IF(FILTER(KDDB>0,5),1,0);
底背:K底背=1;