联系方式 Contact

云指标公式网

翔博软件:www.xiangbosoft.com

电话:18020657357

微信:332879389

Q Q:287762038

点击这里给我发消息

网址:www.yzhibiao.com

搜索 Search

MACD背离公式

2016-12-31 17:38:15点击:

问:怎么每天都能免费收到这种原创好指标呢?
答:只需加微信:396950280关注朋友圈即可,天天更新!


想做个提示MACD背离的指标 研究好久 还是没有达到想要的效果  求高手赐教 不胜感激 目标:当股价创新高而DIF没有创新高时提示有背离可能 DIF也创新高时提示消失 


DIFF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIFF,9);
MACD:2*(DIFF-DEA), COLORSTICK,LINETHICK2;
金叉:=CROSS(DIFF,DEA);
死叉:=CROSS(DEA,DIFF);
KH:=REF(HHV(H,金叉),死叉);
KL:=REF(LLV(L,死叉),金叉);
MH:=REF(HHV(DIFF,金叉),死叉);
ML:=REF(LLV(DIFF,死叉),金叉);
A1:=BARSLAST(REF(金叉,1));
A2:=BARSLAST(REF(死叉,1));
顶背离:=C>KH AND DIFFDEA;
底背离:=CML AND DIFF
A3:=IF(顶背离,1,0);
A8:=IF(DIFF>DEA,1,0);
DRAWTEXT(FILTER(底背离,A2),DIFF,'←底背离'),COLORRED;
DRAWTEXT(FILTER(顶背离,A1),DIFF,'←顶背离'),COLORGREEN;