变色macd顶底背离指标(副图 源码 贴图)
DIFF : EMA(CLOSE,12) - EMA(CLOSE,26);DEA: EMA(DIFF,9);
MACD : 2*(DIFF-DEA);
ZERO : 0;
GJ:=MAX(C,O);
STICKLINE(MACD>0 AND MACD>=REF(MACD,1),0,MACD,2,0),COLOR0000FF;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),0,MACD,2,0),COLORFFFF00;
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),0,MACD,2,0),COLORFF00FF;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),0,MACD,2,0),COLOR00FF00;
L4:=LLV(GJ,4);
GT:=DEA>REF(DEA,1) AND REF(DEA,1)<REF(DEA,2);
A1:=BARSLAST(REF(GT,1));
底背离:=REF(L4,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND GT;
DRAWTEXT(底背离,REF(DEA,A1)*1.18,'底背离'),COLORFF00FF;
H4:=HHV(GJ,4);
GT2:=DEA<REF(DEA,1) AND REF(DEA,1)>REF(DEA,2);
A2:=BARSLAST(REF(GT2,1));
顶背离:= REF(H4,A2+1)<H4 ANDDIFF<REF(DIFF,A2+1) AND GT2;
DRAWTEXT(顶背离,REF(DEA,A2)*1.18,'顶背离'),COLORGREEN;
DRAWICON( CROSS(DIFF,DEA) ,DIFF,1);
DRAWICON( CROSS(DEA,DIFF),DEA,2);
谢谢好心人 谢谢好心人
感谢楼主分享 感谢楼主分享 感谢{:1_88:} 楼主辛苦了 好的.谢谢股友 ,,,,,,,,,,,,,, ///////////// 好东西,收下了