股票软件通达信精品指标公式-MACD转折点指标源码通达信公式
公式源码:
DIFF:(EMA(C,12)-EMA(C,26))*20,COLORWHITE,LINETHICK1;
DEA:EMA(DIFF,9),COLORYELLOW,LINETHICK1;
MACD1:2*(DIFF-DEA),NODRAW;
MACD2:=EMA((3*MACD1+2*REF(MACD1,1)+REF(MACD1,2))/6,1);
STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,0,0),COLORRED;
STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,2,0),COLORMAGENTA;
STICKLINE(MACD1<MACD2,0,MACD1,0,0),COLORCYAN;
STICKLINE(MACD1>0 AND MACD1<=REF(MACD1,1),0,MACD1,0,1),COLORRED;
金叉:=CROSS(DIFF,DEA) AND DIFF<0;
DRAWTEXT(金叉,0,' 金叉'),COLORWHITE;
金叉1:=CROSS(DIFF,DEA) AND DIFF>=0;
DRAWTEXT(金叉1,0,' 金叉'),COLORYELLOW;
红柱面积:SUM(MACD,BARSLAST(MACD<0))*(MACD>0),COLORRED,NODRAW;
绿柱面积:SUM(MACD,BARSLAST(MACD>0))*(MACD<0),COLORGREEN,NODRAW;
DIF1A:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA1A:=EMA(DIF1A,9);
MACDA:=(DIF1A-DEA1A)*2*60;
低位金叉:=CROSS(DIF1A,DEA1A) AND DIF1A<-0.1;
JCCOUNT:=COUNT(CROSS(DIF1A,DEA1A),BARSLAST(DEA1A>=0));
二次金叉:=CROSS(DIF1A,DEA1A) AND DEA1A<0 AND COUNT(JCCOUNT=2,21)=1;
A101:=BARSLAST(REF(CROSS(DIF1A,DEA1A),1));
底背离:=REF(CLOSE,A101+1)>CLOSE AND DIF1A>REF(DIF1A,A101+1) AND CROSS(DIF1A,DEA1A);
DRAWTEXT(底背离,-3.5,'背离'),COLORYELLOW;
特别提示:
选股预警指标编写 ,不同主流行情软件间指标转换。 请联系微信:396950280
一个聚百万原创指标公式圈子