N:=5;
M1:=2;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:SMA(RSV,3,1),COLORWHITE;
D:SMA(K,3,1),COLORYELLOW;
J:3*K-2*D,NODRAW,COLORMAGENTA;
FILLRGN(K>D,K,D,RGB(128,0,0));
FILLRGN(K<D,K,D,RGB(0,128,0));
DRAWICON(CROSS(K,D),K,1);
DRAWICON(CROSS(D,K),D,2);
判:REF((D*3-K*2)*(HHV(H,(N-1))-LLV(L,(N-1)))/100+LLV(L,(N-1)),1),NODRAW,COLORWHITE;
预20:REF(LLV(L,(N-1))+(HHV(H,(N-1))-LLV(L,(N-1)))*(M1*20-(M1-1)*K)/100,1),NODRAW,COLORWHITE;
预50:REF(LLV(L,(N-1))+(HHV(H,(N-1))-LLV(L,(N-1)))*(M1*50-(M1-1)*K)/100,1),NODRAW,COLORYELLOW;
预80:REF(LLV(L,(N-1))+(HHV(H,(N-1))-LLV(L,(N-1)))*(M1*80-(M1-1)*K)/100,1),NODRAW,COLORMAGENTA;
JC:=D>K;
SC:=K>D;
金叉天数:BARSLAST(JC),NODRAW,COLORYELLOW;
死叉天数:BARSLAST(SC),NODRAW,COLORWHITE;
IF(COUNT(K>80,3)=3,88,NULL),POINTDOT,COLORYELLOW,LINETHICK7;
IF(COUNT(K<20,3)=3,15,NULL),POINTDOT,COLORBLUE,LINETHICK7;
IF(COUNT(K>80,1)=1,88,NULL),POINTDOT,COLORRED,LINETHICK4;
IF(COUNT(K<20,1)=1,15,NULL),POINTDOT,COLORGREEN,LINETHICK4;
STICKLINE(1,20,20,100,0),COLORGRAY;
STICKLINE(1,50,50,100,0),COLORCYAN;
STICKLINE(1,80,80,100,0),COLORMAGENTA;
DRAWICON(CROSS(K,20),K,4);
DRAWICON(CROSSDOWN(K,80),K,5);