通达信MACD底顶背离源码副图

DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
QZQ:=BARSLAST(REF(MACD,1)<0 AND MACD>0);
MACD金叉天数:=REF(QZQ,1);
股价新低:=L=LLV(L,QZQ+10);
低7:=COUNT(股价新低,7)>0;
DIFF最低:=LLV(DIFF,QZQ-2)>LLV(DIFF,QZQ+10);
DIF非新低:=REF(DIFF最低,1);
底背离1:=低7 AND DIF非新低 AND CROSS(DIFF,DEA) AND COUNT(CROSS(DEA,DIFF),5)<2,COLORRED;
底背离:IF(底背离1,0.5,0),COLORRED,LINETHICK2;
EJ:=REF(COUNT(底背离1,QZQ+1)=1,1) AND CROSS(DIFF,DEA) AND DIFF<0;
黄金叉:IF(EJ,0.7,0),COLORMAGENTA,LINETHICK2;
QSC:=BARSLAST(REF(MACD,1)>0 AND MACD<0);
MACD死叉天数:=REF(QSC,1);
股价新高:=H=HHV(H,QSC+10);
高7:=COUNT(股价新高,7)>0;
DIFF最高:=HHV(DIFF,QSC-2)<HHV(DIFF,QSC+10);
DIF非新高:=REF(DIFF最高,1);
顶背离1:=高7 AND DIF非新高 AND CROSS(DEA ,DIFF) AND COUNT(CROSS(DIFF,DEA),5)<2,LINESTICK;
顶背离:IF(顶背离1,0.5,0),COLORYELLOW,LINETHICK2;
DRAWTEXT(顶背离1,0.4,'顶背离'),COLORLIBLUE;
DRAWTEXT(底背离1,0.4,'底背离'),COLORMAGENTA;
DRAWTEXT(EJ,0.6,'黄金叉'),COLORMAGENTA;




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

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

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

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