同花顺MACD背离源码

DIFF:EMA(CLOSE,13) - EMA(CLOSE,21);

DEA:EMA(DIFF,8);

MACD:2*(DIFF-DEA), COLORSTICK,COLOR5454FF;

DD:=C=HHV(C,144);

EE:=DEA< REF(DEA,1) AND REF(DEA< REF(DEA,1),1)=1;

CC:=C> REF(C,1) AND REF(C> REF(C,1),1)=1;

上升背离:(CC AND EE)*DEA,COLOR00FFFF;

顶背离:(DD AND EE AND DEA< HHV(DEA,144))*DEA,STICK,LINETHICK3,colorgreen;

FF:=C=LLV(C,144);

GG:= DEA> REF(DEA,1) AND REF(DEA> REF(DEA,1),1)=1;

LL:=C< REF(C,1) AND REF(C< REF(C,1),1)=1;

下降背离:(LL AND GG)*DEA,colormagenta;

底背离:(FF AND GG AND DEA> LLV(DEA,144))*DEA,STICK,LINETHICK3,colorred;

MM:=IF(MACD< 0,MACD,0);

JJ:=MM> REF(MM,1);

ZZ:=REF(JJ,1)=1;

介入区:(JJ AND ZZ)*DEA,POINTDOT,colorred;

STICKLINE(介入区=DEA,DEA,DIFF,3,0),colorred;

DRAWTEXT(CROSS(DIFF,DEA ),0,'金\N叉'),colorcyan;

DRAWTEXT(CROSS(DEA,DIFF ),0,'死叉'),colorgreen;




来函数检测结果如下:
该公式没有未来函数

解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股票指标网别名指标网仅为互联网文章,所有股票指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。股票指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图