0,POINTDOT,COLORBLUE,LINETHICK3;
{波段}
买:=IF("kdj.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,3,1),COLORRED;
BBB:STICKLINE(VAR4>MA1 AND REF(VAR4,1)<30,VAR4,MA1,3,1),COLORRED;
STICKLINE(VAR4<=MA1,VAR4,MA1,3,1),COLORFFCC66;
STICKLINE(CROSS(9.9,买),VAR4+5,MA1-4,3,1),COLORYELLOW;
XXX:=STICKLINE(BBB,VAR4+5,MA1-4,3,1),COLORYELLOW;
STICKLINE(FILTER(XXX ,5) ,VAR4+5,MA1-4,3,1),COLORYELLOW;
DRAWICON(CROSS(9.9,买),VAR4-12,5);
{抄底}
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);
STICKLINE(CROSS(BIAS,乖离) AND 乖离<-9,10,0,5,0),COLOR009999;
STICKLINE(CROSS(BIAS,乖离) AND 乖离<-9,10,0,4,0),COLOR00BBBB;
STICKLINE(CROSS(BIAS,乖离) AND 乖离<-9,10,0,3,0),COLOR00DDDD;
DRAWTEXT(CROSS(BIAS,乖离) AND 乖离<-9,4,'底'),COLOR006600;
多头:(EMA(CLOSE,5)-EMA(CLOSE,20))/EMA(CLOSE,20)*400,COLORRED,LINETHICK2;
IF(多头<REF(多头,1),多头,DRAWNULL),COLORYELLOW,LINETHICK2;
空头:(EMA(C,20)-EMA(C,5))/EMA(C,5)*400,COLORGREEN,LINETHICK2;
IF(空头<REF(空头,1),空头,DRAWNULL),COLORBLUE,LINETHICK2;
STICKLINE( 多头>REF(多头,1),多头,0,2,0),COLORFF00FF,LINETHICK2;