大智慧量价MACD副图指标源码 无未来
利用OBV做成的量价MACD,使用方法同软件自带MACD,金叉更为准确,见下图。
OBV:=MA(SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),-VOL,0)),0)/25000,1);
obve:=ema(obv,3);
DIFF : EMA(obve,12) - EMA(obve,26);
bbDIFF:=DIFF-ref(DIFF,1);
DEA : EMA(DIFF,9);
bbDEA:=DEA-ref(DEA,1);
MACD : 2*(DIFF-DEA), COLORSTICK;
STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,4,0),colorgreen;
STICKLINE(MACD<ref(MACD,1)and MACD<0,0,MACD,4,0),colorFFCC33;
STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,4,0),COLOR0099FF;
STICKLINE(MACD>ref(MACD,1)and MACD>0,0,MACD,4,0),COLORred;