通达信MACD 红绿柱面积(指标 副图 贴图)

2017-02-01 18:31:00来源:本站整理浏览:269

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;


股票公式栏目导航

精品指标推荐

最新热门

本类随机推荐

相关公式