DRAWGBK(C=C,COLORRGB(260,0,0),COLORRGB(180,180,180),1);
T1:=SUMBARS(VOL,CAPITAL);
H1:=FILTER(HHV(HIGH,T1) = REF(HIGH,T1),3);
L1:=FILTER(LLV(LOW,T1) = REF(LOW,T1),3);
STICKLINE(H1 OR L1,0,20,2,1),color4B0082;
DRAWTEXT(H1 OR L1,10,'一级变盘'),color4B0082;
T2:=SUMBARS(VOL,2 * CAPITAL);
H2:=FILTER(HHV(HIGH,T2) = REF(HIGH,T2),3);
L2:=FILTER(LLV(LOW,T2) = REF(LOW,T2),3);
STICKLINE(H2 OR L2,20,40,2,1),color4B0082;
DRAWTEXT(H2 OR L2,30,'二级变盘'),color4B0082;
T3:=SUMBARS(VOL,3 * CAPITAL);
H3:=FILTER(HHV(HIGH,T3) = REF(HIGH,T3),3);
L3:=FILTER(LLV(LOW,T3) = REF(LOW,T3),3);
STICKLINE(H3 OR L3,40,60,2,1),color4B0082;
DRAWTEXT(H3 OR L3,50,'三级变盘'),color4B0082;
T4:=SUMBARS(VOL,4 * CAPITAL);
H4:=FILTER(HHV(HIGH,T4) = REF(HIGH,T4),3);
L4:=FILTER(LLV(LOW,T4) = REF(LOW,T4),3);
STICKLINE(H4 OR L4,60,80,2,1),color4B0082;
DRAWTEXT(H4 OR L4,70,'四级变盘'),color4B0082;
T5:=SUMBARS(VOL,5 * CAPITAL);
H5:=FILTER(HHV(HIGH,T5) = REF(HIGH,T5),3);
L5:=FILTER(LLV(LOW,T5) = REF(LOW,T5),3);
STICKLINE(H5 OR L5,80,100,2,1),color4B0082;
DRAWTEXT(H5 OR L5,90,'五级变盘'),color4B0082;
变盘点:= IF(OPEN<=MA(CLOSE,5) AND OPEN<=MA(CLOSE,10) AND OPEN<=MA(CLOSE,30) AND CLOSE>=MA(CLOSE,5) AND CLOSE>=INTPART(SUM(CLOSE*VOL*100,28)/SUM(VOL*100,28)*100)/100 AND EMA(EMA(CLOSE,5)-EMA(CLOSE,10),9)-REF(EMA(EMA(CLOSE,5)-EMA(CLOSE,10),9),1)>0 AND EMA(CLOSE,5)-EMA(CLOSE,10)-REF(EMA(CLOSE,5)-EMA(CLOSE,10),1)>0,70,50);
STICKLINE(变盘点=70,40,60,2,1),color4B0082;
DRAWTEXT(变盘点=70,50,'变盘点'),color4B0082;
Var60:=ma(100*(winner(1.1*c)-winner(0.9*c)),5)/ma(100*(winner(1.1*c)-winner(0.9*c)),34);
STICKLINE(FILTER(cross(ma(Var60,4),Var60)and Var60>1,55),40,60,2,1),color4B0082;
DRAWTEXT(FILTER(cross(ma(Var60,4),Var60)and Var60>1,55),50,'变盘'),color4B0082;
0,color4B0082;
20,color4B0082;
40,color4B0082;
60,color4B0082;
80,color4B0082;
100,color4B0082;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:SMA(RSV,3,1),COLORRED;
D:SMA(K,3,1),COLORGREEN;
j:3*k-2*d,COLORBLUE;
短线买入:STICKLINE( CROSS(SMA(MAX(CLOSE-REF(CLOSE,1),0),7,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)*100,20),0,10,8,0),COLORred;
短线卖出:STICKLINE( CROSS(80,SMA(MAX(CLOSE-REF(CLOSE,1),0),7,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)*100),90,100,8,0),COLORgreen;
顶:STICKLINE(CROSS(400,SUM(IF(CLOSE>REF(CLOSE,1),VOL,0),26)/SUM(IF(CLOSE<=REF(CLOSE,1),VOL,0),26)*100),100,110,8,0),,COLORedd1d8;
底:stickline(if(LLV(C,500)=LLV(C,5) AND C/REF(C,1)>(1+9.8/100),50,0)>0,-10,0,8,0),color7B68EE;
买:=IF(J<0,10,0);
条件:=CROSS(9.9,买);
VAR1:=(2*CLOSE+HIGH+LOW)/4;
VAR2:=LLV(LOW,5);
VAR3:=HHV(HIGH,5);
VAR4:=EMA((VAR1-VAR2)/(VAR3-VAR2)*100,5);
MA1:=MA(VAR4,2);
AA:STICKLINE(VAR4>MA1,VAR4,MA1,6,1),COLORRED;
BBB:STICKLINE(VAR4>MA1 AND REF(VAR4,1)<30,VAR4,MA1,6,1),COLORRED;
STICKLINE(VAR4<=MA1,VAR4,MA1,6,1),COLORBB0066;
DRAWICON(CROSS(9.9,买),VAR4-12,4);
STICKLINE(CROSS(9.9,买),VAR4+5,MA1-4,6,1),COLORYELLOW;
XXX:STICKLINE(VAR4>MA1 AND REF(VAR4,1)<30,VAR4+5,MA1-4,6,1),COLORYELLOW;
BIAS1:=(C-MA(C,6))/MA(C,6)*100;
BIAS2:=(C-MA(C,12))/MA(C,12)*100;
BIAS3:=(C-MA(C,24))/MA(C,24)*100;
BIAS:=(BIAS1+2*BIAS2+3*BIAS3)/6;
乖离:=MA(BIAS,3);
DRAWTEXT(CROSS(BIAS,乖离) AND 乖离<-9,VAR4+5,'----二次底买'),COLORRED;
DRAWTEXT(CROSS(乖离,BIAS) AND 乖离>9,VAR4+5,'----二次顶卖'),COLORGREEN;
周k:"KDJ.k#WEEK",linethick2,COLORMAGENTA;
周d:"KDJ.D#WEEK",linethick2,COLORCYAN;
周j:"KDJ.j#WEEK",linethick2,COLORGRAY;