N1:=1;
M1:=13;
M2:=9;
R:=(CLOSE-LLV(LOW,N1))/(HHV(HIGH,N1)-LLV(LOW,N1))*100;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
T1:=REF(J,1)-REF(J,2)<0 AND J>REF(J,1)-0.7 AND J-REF(J,1)>REF(J,1)-REF(J,2);
T2:=REF(J,1)-REF(J,2)>0 AND J>REF(J,1);
T:=T1 OR T2;
流入:IF(T=1,J,0),STICK,LINETHICK1,colorred;
流出:IF(T=0,J,0),STICK,LINETHICK1,colorgreen;
黄金坑:IF(J<0,J,0),STICK,LINETHICK1,coloryellow;
XG:IF(流入>0 AND REF(黄金坑,1)<0,10,0);