以下是通达信指标公式源码和截图
通达信macd选股指标公式源码:
MACD回0轴
1.DIF:=(EMA(CLOSE,12)-EMA(CLOSE,26))/EMA(CLOSE,26)*100;
2.DEA:=EMA(DIF,9);
3.DIF 0ANDDIF -0.3ANDCOUNT(DIF REF(DIF,1),4)=4
4.ANDDEA DIFANDMA(DIF,10) 0ANDREF(DIF,3) =0ANDC/MA(C,10) 0.95;
复制代码
适用于30F、60F选股
MACD0轴上第一个
1.DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
2.DEA:=EMA(DIF,9);
3.MACD:=(DIF-DEA)*2;
4.AA:=CROSS(DIF,DEA)ANDDEA
5.BB:=BARSLAST(CROSS(DEA,DIF))ANDDEA
6.CC:=REF(BARSLAST(CROSS(DIF,0)) 20,BARSLAST(CROSS(DEA,DIF))+1);
7.AAANDBBANDCC;
M1:MA(C,5);
M2:MA(C,10);
水平线:IF(CROSS(M2,M1),M2,REF(M2,BARSLAST(CROSS(M2,M1)))),LINETHICK2,COLORGREEN;
XG:=CROSS(M1,水平线)ANDREF(MA(C,5),1) 水平线ANDMA(C,5)
DRAWTEXT(XG,H+0.05,'★'),COLORYELLOW;
{金叉--突破选股}
M1:=MA(C,5);
M2:=MA(C,10);
水平线:=IF(CROSS(M2,M1),M2,REF(M2,BARSLAST(CROSS(M2,M1))));
XG:CROSS(M1,水平线)ANDREF(MA(C,5),1) 水平线ANDMA(C,5)
A:=MA(C,5) MA(C,10)ANDCOUNT(MA(C,10) REF(MA(C,10),1),10)
A1:=C OANDREF(C O,1);
A2:=C/REF(C,1) 1.07;
XG:AANDA1ANDA2;
通达信macd选股指标公式截图