RSV16:=(CLOSE-LLV(LOW,144))/(HHV(HIGH,144)-LLV(LOW,144))*100;
RSV166:=SMA(RSV16,48,1);
K16:=SMA(RSV166,21,1);
D16:=SMA(K16,21,1);
RSV8:=(CLOSE-LLV(LOW,72))/(HHV(HIGH,72)-LLV(LOW,72))*100;
RSV88:=SMA(RSV8,24,1);
K8:=SMA(RSV88,13,1);
D8:=SMA(K8,13,1);
RSV4:=(CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100;
RSV44:=SMA(RSV4,12,1);
K4:=SMA(RSV44,8,1);
D4:=SMA(K4,8,1);
RSV2:=(CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100;
RSV22:=SMA(RSV2,6,1);
K2:=SMA(RSV22,5,1),LINETHICK1,COLORWHITE;
D2:=SMA(K2,5,1),LINETHICK1,COLORYELLOW;
RSV1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
RSV11:=SMA(RSV1,3,1);
K1:=SMA(RSV11,3,1),COLORRED,LINETHICK1;
D1:=SMA(K1,3,1),COLOR00FF00,LINETHICK1;
A0:=K16 =D16 AND K16 REF(K16,1);
B0:=K16 =D16 AND K16 REF(K16,1);
B10:=(K16 =D16 AND K16 REF(K16,1)) OR( K16 =D16 AND K16 REF(K16,1));
STICKLINE(A0 0,K16,D16,10,0),COLORMAGENTA;
STICKLINE(B0 0,K16,D16,10,0),COLORGRAY;
STICKLINE(B10 0,K16,D16,10,0),COLORWHITE;
A:=K8 =D8 AND K8 REF(K8,1);
B:=K8 =D8 AND K8 REF(K8,1);
B1:=(K8 =D8 AND K8 REF(K8,1)) OR( K8 =D8 AND K8 REF(K8,1));
STICKLINE(A 0,K8,D8,10,0),COLOR0022C3;
STICKLINE(B 0,K8,D8,10,0),COLORA3C03F;
STICKLINE(B1 0,K8,D8,10,0),COLORWHITE;
AA:=K4 =D4 AND K4 REF(K4,1);
BB:=K4 =D4 AND K4 REF(K4,1);
BB1:=(K4 =D4 AND K4 REF(K4,1)) OR (K4 =D4 AND K4 REF(K4,1));
STICKLINE(AA 0,K4,D4,10,0),COLOR4097FF;
STICKLINE(BB 0,K4,D4,10,0),COLORF06232;
STICKLINE(BB1 0,K4,D4,10,0),COLORWHITE;
IF(K2 REF(K2,1),K2,K2),LINETHICK2,COLORRED;
IF(K2 REF(K2,1)AND REF(K2,1) 50,K2,DRAWNULL),LINETHICK2,COLORRED;
IF(D2 REF(D2,1),D2,D2),LINETHICK1,COLORYELLOW;
IF(D2 REF(D2,1),D2,DRAWNULL),LINETHICK1,COLORYELLOW;
IF(K1 REF(K1,1),K1,K1),LINETHICK1,COLORRED;
IF(K1 REF(K1,1),K1,DRAWNULL),LINETHICK1,COLORWHITE;
IF(K1 REF(K1,1)AND REF(K1,1) 50,K1,DRAWNULL),LINETHICK1,COLORRED;
IF(D1 REF(D1,1),D1,D1),LINETHICK1,COLORWHITE;
IF(D1 REF(D1,1),D1,DRAWNULL),LINETHICK1,COLORWHITE;
STICKLINE(K2 D2 AND K2 REF(K2,1),K2,D2,1,1),COLORRED;
STICKLINE(K2 D2 AND K2 REF(K2,1),K2,D2,1,1),COLORFF0000;
JCCOUNT:=BARSLAST(CROSS(K4,D4) AND K4
短二金:=CROSS(K4,D4) AND K4 30 AND COUNT(JCCOUNT=2,21)=1;
DRAWICON(短二金,K4,1);
JCCOUNT1:=BARSLAST(CROSS(K8,D8) AND K8
长二金:=CROSS(K8,D8) AND K8 30 AND COUNT(JCCOUNT=2,42)=1;
DRAWICON(长二金,K8,1);
五浪底选股:STICKLINE(K1 REF(K1,1) AND K2 REF(K2,1) AND K2 50 AND K4 =D4 AND K4 K8 AND K8 25} ,0,100,0,1),COLORYELLOW};
小三浪升选股:IF(K1 50 AND K1 D1 AND K1 REF(K1,1) AND K8 D8 AND K8 REF(K8,1),20,0),COLORYELLOW;
七浪底选股:STICKLINE( K2 REF(K2,1) AND K4 REF(K4,1) AND K4 50 AND K8 =D8 AND K8 K16 AND K16 25,0,100,0,1),COLORRED;
大三浪升选股:IF(K2 50 AND K2 D2 AND K2 REF(K2,1) AND K16 D16 AND K16 REF(K16,1),20,0),COLORRED;
{OBV:=K1;}
P:=5;
{A1:=REF(OBV,P)=HHV(OBV,2*P+1);
B1:=FILTER(A1,P);
C1:=BACKSET(B1,P+1);
D1:=FILTER(C1,P);}
{高点}
A2:=REF(OBV,P)=LLV(OBV,2*P+1);
B2:=FILTER(A2,P);
C2:=BACKSET(B2,P+1);
D21:=FILTER(C2,P);{低点}
VAR2:=CROSS(D1,0.9);
VAR4:=CROSS(D2,0.9);
UU:=BACKSET(CURRBARSCOUNT,BARSLAST(VAR4)+1);
VV:=UU REF(UU,1);
WW:=BACKSET(VV,REF(BARSLAST(VAR4),1)+2);
XX:=WW REF(WW,1);
DRAWLINE(XX,OBV,VV,OBV,1),COLORWHITE;
UU2:=BACKSET(CURRBARSCOUNT,BARSLAST(VAR2)+1);
VV2:=UU2 REF(UU2,1);
WW2:=BACKSET(VV2,REF(BARSLAST(VAR2),1)+2);
XX2:=WW2 REF(WW2,1);
DRAWLINE(XX2,OBV,VV2,OBV,1),COLORWHITE;