DIFF:EMA(CLOSE,10)-EMA(CLOSE,26);
DEA:EMA(DIFF,9);
MACD:2*(DIFF-DEA),NODRAW;
连续走强:EVERY(MACD>REF(MACD,1) AND MACD>0,2),NODRAW;
强势回调:EVERY(MACD<REF(MACD,1) AND MACD>0,2),NODRAW;
连续走弱:EVERY(MACD<REF(MACD,1) AND MACD<0,2),NODRAW;
连续反弹:EVERY(MACD>REF(MACD,1) AND MACD<0,2),NODRAW;
STICKLINE(连续反弹,MACD,MACD+0.1,1,0),COLORRED;
DRAWTEXT(连续反弹,MACD+0.15,55),COLORRED;
STICKLINE(MACD>=0,MACD,0,4,1),COLORF00FF0;
STICKLINE(MACD<0,MACD,0,4,1),COLORWHITE;
STICKLINE(MACD<REF(MACD,1) AND MACD>0,0,MACD,3,0),COLOR00AAFF;
STICKLINE(MACD<REF(MACD,1) AND MACD>0,0,MACD,2.3,0),COLOR00BBFF;
STICKLINE(MACD<REF(MACD,1) AND MACD>0,0,MACD,1.2,0),COLOR00CCFF;
STICKLINE(MACD<REF(MACD,1) AND MACD>0,0,MACD,1.65,0),COLOR00DDFF;
STICKLINE(MACD<REF(MACD,1) AND MACD>0,0,MACD,1.1,0),COLOR00EEFF;
STICKLINE(MACD<REF(MACD,1) AND MACD>0,0,MACD,0.55,0),COLORYELLOW;
STICKLINE(MACD>=REF(MACD,1) AND MACD>0,0,MACD,3,0),COLOR0000AA;
STICKLINE(MACD>=REF(MACD,1) AND MACD>0,0,MACD,2.3,0),COLOR0011BB;
STICKLINE(MACD>=REF(MACD,1) AND MACD>0,0,MACD,1.2,0),COLOR0022CC;
STICKLINE(MACD>=REF(MACD,1) AND MACD>0,0,MACD,1.65,0),COLOR0033DD;
STICKLINE(MACD>=REF(MACD,1) AND MACD>0,0,MACD,1.1,0),COLOR0044EE;
STICKLINE(MACD>=REF(MACD,1) AND MACD>0,0,MACD,0.55,0),COLOR0055FF;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,3,0),COLORAA00BB;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,2.3,0),COLORBB11BB;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,1.2,0),COLORCC22BB;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,1.65,0),COLORDD33BB;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,1.1,0),COLOREE44BB;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,0.55,0),COLORFF55BB;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,3,0),COLORFFAA00;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,2.3,0),COLORFFBB11;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,1.2,0),COLORFFCC22;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,1.65,0),COLORFFDD33;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,1.1,0),COLORFFEE44;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,0.55,0),COLORFFFF55;
IF(DIFF<0,DIFF,0),COLORRED,LINETHICK2;
IF(DIFF<0,0,DIFF),COLORYELLOW,LINETHICK2;
IF(DIFF<DEA,DIFF,DEA),COLORGREEN;
IF(DIFF>DEA,DEA,DEA),COLORBLUE,LINETHICK2;
X_1:=CROSS(DIFF,DEA) AND DIFF<(-0.1);
STICKLINE(X_1,0,(-0.1),3,0),COLORYELLOW;
DRAWTEXT(X_1,(-0.1),56),COLORYELLOW;
X_2:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
X_3:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(X_2=2,21)=1;
STICKLINE(X_3,0,(-0.1),2,0),COLORMAGENTA;
DRAWICON(X_3,DEA*1.04,13);
DRAWTEXT(X_3,(-0.18),57),COLORMAGENTA;
X_4:=BARSLAST(REF(CROSS(DIFF,DEA),1));
X_5:=REF(CLOSE,X_4+1)>CLOSE AND DIFF>REF(DIFF,X_4+1) AND CROSS(DIFF,DEA);
STICKLINE(X_5,0,0.15,2,0),COLORMAGENTA;
DRAWTEXT(X_5,DEA,58),COLORRED;
X_6:=BARSLAST(REF(CROSS(DEA,DIFF),1));
X_7:=REF(CLOSE,X_6+1)<CLOSE AND REF(DIFF,X_6+1)>DIFF AND CROSS(DEA,DIFF);
DRAWTEXT(X_7,DEA,59),COLORGREEN;
X_8:=DIFF<0 AND DEA<0;
X_9:=X_8>REF(X_8,1);
X_10:=BARSLAST(X_9);
X_11:=COUNT(DEA>0 AND DIFF>0,X_10)=0;
X_12:=CROSS(DIFF,DEA);
X_13:=BARSLAST(X_12);
X_14:=REF(X_13,X_13+1)+X_13;
X_15:=(DIFF+DEA)/2;
X_16:=(HIGH+LOW)/2;
X_17:=X_12 AND X_14<X_10 AND X_11 AND X_15>REF(X_15,X_14) AND X_16<REF(X_16,X_14) AND MACD>0;
DRAWTEXT(X_17,DIFF*0.95,60),COLORYELLOW;
X_18:=KD.K#WEEK(9,3,3);
X_19:=KD.D#WEEK(9,3,3);
DRAWBAND(X_18/100,RGB(250,0,250),X_19/100,RGB(0,250,250));
周金叉:CROSS(X_18,X_19)*0.2;
X_20:=KD.K(4,3,3);
X_21:=KD.D(4,3,3);
月金叉:CROSS(X_20,X_21)*0.4,COLORWHITE,LINETHICK2;
DRAWBAND(X_20/50,RGB(250,200,0),X_21/50,RGB(80,150,250));
|