N:=5;
M1:=3;
M2:=3;
RSV=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
a=SMA(RSV,M1,1);
b=SMA(a,M2,1);
e=3*a-2*b;
IF(a<0) a=0;
IF(a>100) a=100;
IF(b<0) b=0;
IF(b>100) b=100;
IF(e<0) e=0;
IF(e>100) e=100;
k:a,colorwhite;
d:b;
j:e,colorred;
STICKLINE(a>=e ,a,e,4,0),colorlicyan;
STICKLINE(e>=a ,a,e,4,0),colorred;
HORLINE(e<>0,60,3,3),colorgreen;
HORLINE(e<>0,30,3,3),colorred;
DRAWTEXT(CROSS(e,a),30,"红线以下上穿为安全买入。");
DRAWTEXT(CROSS(a,e),60,"绿线以上下穿为谨慎卖出。");
DRAWICON(CROSS(e,a),a,1);
DRAWICON(CROSS(a,e),e,2);