大智慧变色MACD指标公式

LONG:=20;SHORT:=10;M:=9;

DIFF : EMA(CLOSE,SHORT) - EMA(CLOSE,LONG),colorred;

DEA : EMA(DIFF,M),COLORYELLOW;

macd : 2*(DIFF-DEA), COLORstICK;

PARTLINE(DIFF,DIFF<DEA),COLORGREEN;

STICKLINE(MacD<ref(MACD,1)and MACD>0,0,MACD,2,0),COLORYELLOW;

STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,2,0),COLORwhite;