可以看到macd的面积,对与缠论的学习很有帮助

DIF:EMA(CLOSE,12)-EMA(CLOSE,26);

DEA:EMA(DIF,9);

MACD:(DIF-DEA)*2,COLORSTICK;

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);

红柱面积:=IF(MACD>0,SUM(MACD,BARSLAST(MACD<0)),0),PRECIS2,COLOR0000FF;

绿柱面积:=IF(MACD<0,SUM(MACD,BARSLAST(MACD>0)),0),PRECIS2,COLOR006000;;

DRAWTEXT(REF(MACD,1)>0 AND MACD<=0 ,HHV(MACD,4),”+TOSTRING(REF(红柱面积,1),2)),colorred; DRAWTEXT(REF(MACD,1)<0 AND MACD>=0 ,LLV(MACD,4),”+TOSTRING(REF(ABS(绿柱面积),1),2)),Color00ff00;

DRAWTEXT(ISNULL(REFX(&CLOSE,1))=1 AND MACD<0,LLV(MACD,4),”+TOSTRING(ABS(绿柱面积),2)),Color004A00;

DRAWTEXT(ISNULL(REFX(&CLOSE,1))=1 AND MACD>0,HHV(MACD,4),”+TOSTRING(ABS(红柱面积),2)),colorred;


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