大智慧优化MACD副图指标
源码
LONG:=26;SHORT:=12;M:=9;
OBV:=MA(SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),-VOL,0)),0)/25000,1);
DIFF:EMA(obv,SHORT) - EMA(obv,LONG);
bbDIFF:=DIFF-ref(DIFF,1);
DEA : EMA(DIFF,M);
bbDEA:=DEA-ref(DEA,1);
MACD : 2*(DIFF-DEA), COLORSTICK;
柱: 2*(DIFF-DEA);
BB柱:=柱-ref(柱,1);
PARTLINE(DIFF,bbDIFF>0),colorcc00ff,LINETHICK2;
PARTLINE(DIFF,bbDIFF<=0),colorff9999,LINETHICK2;
PARTLINE(DEA,bbDEA>0),color0066ff,LINETHICK2;
PARTLINE(DEA,bbDEA<=0),color00ff33,LINETHICK2;
PARTLINE(柱,BB柱>0),colorcc00ff,LINETHICK1;
PARTLINE(柱,BB柱<=0),colorff9999,LINETHICK1;
DIFF速率:bbDIFF*100,LINETHICK0;
DEA速率:bbDEA*100,LINETHICK0;
柱速率:BB柱*100,LINETHICK0;