N1:=9;
M1:=3;
M2:=3;
M3:=2;
X:19,COLORGREEN,LINETHICK3;
RSV:=(CLOSE-LLV(LOW, N1))/(HHV(HIGH, N1)-LLV(LOW,N1))*100;
F:=SMA(RSV, M1, 1);
K:=SMA(F, M2, 1);
D:=SMA(K, M3, 1);
波:K,COLORRED,LINETHICK2;
段:D,COLORYELLOW,LINETHICK2;
提前信号一:= crOSS(F, K) AND K < 25;
抄底信号:=CROSS(K,D) AND K<50;
底部放量:=抄底信号 AND vol>REF(VOL,1)*2 AND VOL > REF(MA(VOL,5),1)*2;
提前信号二:=CROSS(F,K) AND K>70 AND K>D;
逃顶信号:= CROSS(D,K) AND K>50;
STICKLINE(提前信号一,0,K+5,1,1), COLORMAGENTA,LINETHICK3;
STICKLINE(抄底信号,0,K+5,1,1), COLORMAGENTA,LINETHICK3;
DRAWTEXT(抄底信号 AND COUNT(抄底信号,10)==1,K+15,'进'),COLORMAGENTA,LINETHICK3;
STICKLINE(底部放量,0,K+5,1,1),COLORRED,LINETHICK2;
DRAWTEXT(底部放量 AND COUNT(底部放量,10)==1,K+5,'放量'),COLORRED,LINETHICK3;
STICKLINE(提前信号二 AND COUNT(提前信号二,5)==1,K-5,100,1,1),COLORGREEN,LINETHICK3;
STICKLINE(逃顶信号, K-5,100,1,1),COLORYELLOW,LINETHICK3;
DRAWTEXT(逃顶信号 AND COUNT(逃顶信号,10)==1,K-15,'逃'),COLORYELLOW,LINETHICK3;