{MACD背离}
DIFF1:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA1:=EMA(DIFF1,9);
DRAWBAND(DEA1,DRAWNULL,DIFF1,RGB(250,0,0));
DIF:EMA(CLOSE,12)-EMA(CLOSE,26),COLORYELLOW;
DEA:EMA(DIF,9),COLORCYAN;
MACD:2*(DIF-DEA),COLORSTICK;
STICKLINE(MACD0,0,MACD,0,0),COLORBROWN;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,0,0),COLORYELLOW;
A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA);
STICKLINE(底背离,0,-0.03,1,0),COLOR00FF00;
底背:DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK4;
DRAWTEXT(底背离,DEA,' 底背离'),COLORFF00FF;
A2:=BARSLAST(REF(CROSS(DEA,DIF),1));
顶背离:=REF(CLOSE,A2+1)
STICKLINE(顶背离,0,0.03,1,0),COLORMAGENTA;
顶背:DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK4;
DRAWTEXT(顶背离,DEA,' 顶背离'),COLORGREEN;
{选股指标}
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9),COLORCYAN;
MACD:=2*(DIF-DEA);
A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
底背离:REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA);
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9),COLORCYAN;
MACD:=2*(DIF-DEA);
A2:=BARSLAST(REF(CROSS(DEA,DIF),1));
顶背离:REF(CLOSE,A2+1)
零上第一金叉 选股 主升浪的摇篮
MACD红柱突破前高
MACD空中加油