通达信MACDOBV指标公式

通达信MACDOBV指标公式

SHORT:=12;
LONG:=26;
MID:=9;
M:=30;
DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:=EMA(DIF,MID);
MACD:=(DIF-DEA)*2;
OBVH:=CONST(HHV(OBV,FROMOPEN));
OBVL:=CONST(LLV(OBV,FROMOPEN));
DIFH:=CONST(HHV(DIF,FROMOPEN));
DIFL:=CONST(LLV(DIF,FROMOPEN));
X:=(OBVH-OBVL)/(DIFH-DIFL);
XBASE:=(OBVH+OBVL)/2;
XDIF😀IF*X+XBASE,COLORWHITE;
XDEA:EMA(XDIF,MID),COLORYELLOW;
XMACD:=MACD*X;
STICKLINE(XMACD>0,XBASE,XMACD+XBASE,0,1),COLORRED,LINETHICK2;
STICKLINE(XMACD<0,XBASE,XMACD+XBASE,0,1),COLORFFFF00,LINETHICK2;
VA:=IF(CLOSE>REF(CLOSE,1),VOL,-VOL);
OBV:SUM(IF(CLOSE=REF(CLOSE,1),0,VA),0),COLORGRAY;
MAOBV:MA(OBV,M),DOTLINE,COLORLIRED;
分时前高:HHV(XDIF,0),DOTLINE,COLORCYAN; {箱体上顶}
分时前低:REF(XDIF,LLVBARS(XDIF,0)),DOTLINE,COLORGREEN;{箱体下底};

原创文章,作者:股神,如若转载,请注明出处:https://www.gupiaoxuexi.com/post/32230

本站所有文章、数据仅供投资者参考,不构成投资建议,风险自负。

发表评论

登录后才能评论