N:=9;
M1:=3;
M2:=3;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:SMA(RSV,M1,1);
D:SMA(K,M2,1);
J:3*K-2*D;
D: EMA(0.667*REF(K,1)+0.333*K,2),colorgreen,LINETHICK1;
DRAWICON(crOSS(K,d),d,'buy');
DRAWICON(CROSS(d,k),k,'sell');
A:=EMA(C,14),colorwhite,LINETHICK1;
B:=(A-REF(A,1))/REF(A,1)*100,NODRAW;
支撑:IF(B>=0,REF(EMA(C,14),BArslAST(CROSS(B,0))+1),DRAWNULL),colorred,LINETHICK2;
阻力:IF(B<0,REF(EMA(C,14),BARSLAST(CROSS(0,B))+1),DRAWNULL),colorgreen,LINETHICK2;
VAR1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);
VAR2:=SMA(Abs(LOW-VAR1),13,1)/SMA(MAX(LOW-VAR1,0),10,1);
VAR3:=EMA(VAR2,10);
VAR4:=LLV(LOW,33);
VAR5:=EMA(IF(LOW>=VAR4,VAR3,0),3);
z:0,colorblack;
主力进场:IF(VAR5<REF(VAR5,1),VAR5,0),colorred,NODRAW;
洗盘:IF(VAR5>REF(VAR5,1),VAR5,0),colorgreen,NODRAW;
STICKLINE(VAR5>REF(VAR5,1),0,VAR5,3,0),colorgreen;
STICKLINE(VAR5<REF(VAR5,1),0,VAR5,3,0 ),COLOR000055;
STICKLINE(VAR5<REF(VAR5,1),0,VAR5,2.6,0 ),COLOR000077;
STICKLINE(VAR5<REF(VAR5,1),0,VAR5,2.1,0 ),COLOR000099;
STICKLINE(VAR5<REF(VAR5,1),0,VAR5,1.5,0 ),COLOR0000BB;
STICKLINE(VAR5<REF(VAR5,1),0,VAR5,0.9,0 ),COLOR0000DD;
STICKLINE(VAR5<REF(VAR5,1),0,VAR5,0.3,0 ),COLOR0000FF;
STICKLINE(VAR5>REF(VAR5,1),0,VAR5,3,0),COLOR005500;
STICKLINE(VAR5>REF(VAR5,1),0,VAR5,2.6,0),COLOR007700;
STICKLINE(VAR5>REF(VAR5,1),0,VAR5,2.1,0),COLOR009900;
STICKLINE(VAR5>REF(VAR5,1),0,VAR5,1.5,0),COLOR00BB00;
STICKLINE(VAR5>REF(VAR5,1),0,VAR5,0.9,0),COLOR00DD00;
STICKLINE(VAR5>REF(VAR5,1),0,VAR5,0.3,0),COLOR00FF00;
VAR21:=SMA(ABS(HIGH-VAR1),13,1)/SMA(MIN(HIGH-VAR1,0),10,1);
VAR31:=EMA(VAR21,10);
VAR41:=HHV(HIGH,33);
VAR51:=EMA(IF(HIGH<=VAR41,VAR31,0),3);
主力拉高:IF(VAR51>REF(VAR51,1),VAR51,0),coloryellow,NODRAW;
STICKLINE(VAR51>REF(VAR51,1),0,VAR51,3,0),coloryellow;
出货:IF(VAR51<REF(VAR51,1),VAR51,0),colorcyan,NODRAW;
STICKLINE(VAR51<REF(VAR51,1),0,VAR51,3,0 ),colorcyan;
短趋势线:MA(CLOSE,13),colorred,LINETHICK3;
涨:IF(短趋势线>REF(短趋势线,1),短趋势线,DRAWNULL),colorred,LINETHICK3;
平:=IF(短趋势线=REF(短趋势线,1),短趋势线,DRAWNULL),COLOR00FFFF,LINETHICK3;
跌:IF(短趋势线<REF(短趋势线,1),短趋势线,DRAWNULL),COLOR80FF00,LINETHICK3;
TT:=(2*CLOSE+OPEN+HIGH+LOW);
主导动能:TT/EMA(TT,4)-1,COLORSTICK;
FF:=主导动能;
STICKLINE(FF>0,0,FF,3,0),COLOR33CFDD;
STICKLINE(FF>0 AND FF>REF(FF,1),0,FF,3,0),COLOR0000CC;
STICKLINE(FF<=0,0,FF,3,0),COLOR00CC00;
STICKLINE(FF<=0 AND FF>REF(FF,1),0,FF,3,0),COLORFF9900;
做多主导:IFF(FF>0 AND FF>REF(FF,1),FF,0),NODRAW,COLOR0000CC;
获利回吐:IFF(FF>0 AND FF<=REF(FF,1),FF,0),NODRAW,COLOR33CFDD;
做空主导:IFF(FF<=0 AND FF<=REF(FF,1),FF,0),NODRAW,COLOR00CC00;
空头回补:IFF(FF<=0 AND FF>REF(FF,1),FF,0),NODRAW,COLORFF9900;