DIFF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIFF,9);
macd:2*(DIFF-DEA),NODRAW;
MacDHS:=IF(MACD>0 AND MACD>REF(MACD,1),MACD,0);
MACDHX:=IF(MACD>0 AND MACD<REF(MACD,1),MACD,0);
MACDLX:=IF(MACD<0 AND MACD<REF(MACD,1),MACD,0);
MACDLS:=IF(MACD<0 AND MACD>REF(MACD,1),MACD,0);
STICKLINE(MACDHS>0,0,MACD,2,0),COLORRED;
STICKLINE(MACDHX>0,0,MACD,2,0),COLORYELLOW;
STICKLINE(MACDLX<0,MACD,0,2,0),COLORCYAN;
STICKLINE(MACDLS<0,MACD,0,2,0),COLORLIGREEN;
绿柱面积:10*IF (MACD<0,SUM(MACD,BArslAST(MACD>0)),0),NODRAW,COLORCYAN;
红柱面积:10*IF (MACD>0,SUM(MACD,BARSLAST(MACD<0)),0),NODRAW,COLORRED;
DRAWNUMBER(REF(MACD,1)>0 AND MACD<=0 ,HHV(MACD,8),REF(红柱面积,1)),COLORRED;
DRAWNUMBER(REF(MACD,1)<0 AND MACD>=0 ,LLV(MACD,4),REF(Abs(绿柱面积),1)),COLORCYAN;
DRAWNUMBER(ISLASTBAR AND MACD<0,LLV(MACD,8),ABS(绿柱面积)),COLORCYAN;
DRAWNUMBER(ISLASTBAR AND MACD>0,HHV(MACD,4),ABS(红柱面积)),COLORRED;

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