以下是通达信MACD四次金交源码

 MACD四次金交

{TYP:=(HIGH+LOW+CLOSE)/3;

CCI:(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14))*0.0015,COLORGREEN,LINETHICK1;}

DIFF:EMA(CLOSE,12)-EMA(CLOSE,27)COLORWHITE;

DEA:EMA(DIFF,9),COLORYELLOW;

MACD:2*(DIFF-DEA)COLORSTICK;

JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));

一次金:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=1,5)=1;

二次金:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,5)=1;

三次金:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=3,5)=1;

四次金:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=4,5)=1;

一次金叉:IF(一次金,0.3,0)COLORYELLOW,LINETHICK2;

二次金叉:IF(二次金,0.3,0)COLORMAGENTA,LINETHICK2;

三次金叉:IF(三次金,0.3,0)COLORLIMAGENTA,LINETHICK2; 

四次金叉:IF(四次金,0.3,0)COLORRED,LINETHICK2;

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。