MACD看盘【副图指标】
{MACD看盘【副图指标】2560战法之MACD副图}
{通用型参数设置: SHORT 2 200 12 LONG 2 200 26 MID 2 200 9}
DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG)COLORGREEN,LINETHICK1;
DEA:=EMA(DIF,MID)COLORFFFF33,LINETHICK1;
MACD:=(DIF-DEA)/0.5,COLORSTICK;
标柱1:STICKLINE(MACD>REF(MACD,1) AND MACD>0,0.0001,MACD,1.5,0),COLORRED;
标柱2:STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0.0001,MACD,1.5,0),COLORYELLOW;
标柱3:STICKLINE(MACD<REF(MACD,1) AND MACD<0,-0.0001,MACD,1.5,0),COLORGREEN;
标柱4:STICKLINE(MACD>=REF(MACD,1) AND MACD<0,-0.0001,MACD,1.5,0),COLORLICYAN;
标柱5:STICKLINE(C>0,0,0,50,1),COLORBLUE; {0 轴 画彩色线}
标柱6:STICKLINE(MACD>0,0,-0.0001,8,0),COLORRED; {0 轴 画彩色线}
标柱7:STICKLINE(MACD<0,0,-0.0001,8,0),COLORGREEN; {0 轴 画彩色线};
DRAWTEXT(LONGCROSS(标柱2,标柱1,1),MACD+0.1,'缩头')COLORGREEN;
DRAWTEXT(LONGCROSS(标柱4,标柱3,3),MACD-0.1,'缩脚')COLORRED;
买卖看缩头缩脚:0,COLORYELLOW,NODRAW;
0,NODRAW,COLORBLACK;
提示0:DRAWTEXT_FIX(C!=0,0.01,0.03,0,'小能量柱柱堆中出现的缩头缩脚信号多是有效的买入卖出信号。'),COLORRED;
A11:=BARSLAST(REF(CROSS(DIF,DEA),1));
底背离:=REF(CLOSE,A11+1)>CLOSE AND DIF>REF(DIF,A11+1) AND CROSS(DIF,DEA);
底背离符号1:=DRAWTEXT(底背离,DEA*0.9-0.1,'▲'),COLORRED;
底背离符号2:DRAWLINE(A11=0,DEA,底背离,DEA,0),COLORRED,DOTLINE;
A21:=BARSLAST(REF(CROSS(DEA,DIF),1));
顶背离:=REF(CLOSE,A21+1)<CLOSE AND REF(DIF,A21+1)>DIF AND CROSS(DEA,DIF);
顶背离符号:DRAWLINE(A21=0,DEA,顶背离,DEA,0),COLORGREEN,DOTLINE;
牛熊分界线:0,COLORLICYAN;
A:=EMA((CLOSE-REF(C,1))/REF(C,1)*10-(INDEXC-REF(INDEXC,1))/REF(INDEXC,1)*10,5),NODRAW,COLORRED;
AA:=STICKLINE(A>0,0,A,1,2),COLORRED;
AB:=STICKLINE(A<0,0,A,1,2),COLORGREEN;
A1:=EMA(CLOSE,7)-EMA(CLOSE,21);
B1:=EMA((0.668*REF(A1,1)+0.333*A1),1);
MACD_牛:IF(A1>=B1,A1,B1),LINETHICK1,COLORRED;
MACD_熊:IF(B1-A1,B1,A1),LINETHICK1,COLORGREEN;
0,NODRAW,COLORBLACK;
{BIAS-QL}
{参数 N2: 2 250 6 M2: 2 250 6}
乖离BIAS:(CLOSE-MA(CLOSE,N))/MA(CLOSE,N)*100,NODRAW,COLOR009FFF;
乖离BIASMA:MA(BIAS,M),NODRAW,COLORBLUE;