macd顶底背离指标源码
DIFF:EMA(CLOSE,5) - EMA(CLOSE,34),COLORFF00FF;
DEA:EMA(DIFF,5),colorliblue;
:=2*(DIFF-DEA);
ZERO:0,colorliblue;
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),COLORFF00FF;
STICKLINE(MACDREF(DEA,1) AND REF(DEA,1)CLOSE AND DIFF>REF(DIFF,A1+1) AND >DRAWLINE(A1=0,DEA,底背离,REF(DEA,A1),0),colorred,LINETHICK2;
DRAWLINE(底背离,DEA,底背离,REF(DEA,A1),0),colorred,LINETHICK2;
DRAWTEXT(底背离,REF(DEA,A1)*1.18,' 底背离'),COLORFF00FF;
H4:=HHV(GJ,4);
GT2:=DEAREF(DEA,2);
A2:=BARSLAST(REF(GT2,1));
顶背离:= REF(H4,A2+1)REF(A0,1);
A3:=BARSLAST(A11);
A4:=COUNT(DEA>0 AND DIFF >0,A3)=0;
A5:=CROSS(DIFF ,DEA);
A6:=BARSLAST(A5);
A7:=REF(A6,A6+1)+A6;
A8:=(DIFF+DEA)/2;
A9:=(HIGH+LOW)/2;
A10:=A5 AND A7REF(A8,A7) AND A90;
DRAWTEXT(A10,DIFF*0.95,'↑金叉'),coloryellow;
DRAWICON(CROSS(DIFF,DEA),DEA,1);
DRAWICON(CROSS(DEA,DIFF),DIFF,2);
各种背离,@云上by要单纯大红色棍子就是macd底背 以此类推,kdj rsi
TIPTEXT(ISNULL(REFX(CLOSE,1)),0,' '),colorred;
TIPTEXT(ISNULL(REF(CLOSE,1)),0,'');