通达信双布林MACD主图指标公式

N:=20;M:=50;
DP:=(H+L+2*C)/4;
MID:= MA(DP,N);
20中轨:MID,COLORWHITE,POINTDOT,LINETHICK2;
{以下为通达信、同花顺均可用的变色k线
STICKLINE(MID>REF(MID,1),MID*1.01,REF(MID,1),4,1),COLORRED;
STICKLINE(MID<=REF(MID,1),MID,REF(MID,1),4,0),COLOR00FF00;}
DRAWBAND(MID,RGB(225,0,0),REF(MID,2),RGB(00,255,00));
20上轨:MID +1.96*STD(DP,N),COLORYELLOW;
20下轨:MID-1.96*STD(DP,N),COLORFF0000;
M2:=MA(DP,M);
50中轨:IF(M2>=REF(M2,1),M2,DRAWNULL),COLORFF00FF,CIRCLEDOT;
IF(M2<REF(M2,1),M2,DRAWNULL),COLORFFB560,POINTDOT,LINETHICK4;
50上轨:M2+2.1*STD(DP,M),LINETHICK2,COLORRED;
50下轨:M2-2.1* STD(DP,M),LINETHICK2,COLOR00FF00;
ZDF:=(C-REF(C,1))/REF(C,1)*100;
STICKLINE(ZDF>9.8,O,C,3,0),COLORRED;
STICKLINE(ZDF<-9.8,O,C,3,0),COLORBLUE;
DIF:=EMA(DP,12);
DEA:=EMA(DP,26);
macd:=(DIF-DEA);
XH:=EMA(MacD,9);
AC:=2*(MACD-XH);
ao1:=REF(MACD,1);
AC1:=REF(AC,1);
KK:=IF(AC>AC1 AND MACD>AO1,5,IF(AC<AC1 AND MACD<AO1,-5,0));
STICKLINE(KK=5,H,L,0.1,0),COLORRED;
STICKLINE(KK=5 AND C>O,C,O,4,1),COLORRED;
STICKLINE(KK=5 AND C<O,C,O,4,0),COLORRED;
STICKLINE(KK=0,H,L,0.1,0),COLORFFFF00;
STICKLINE(KK=0 AND C<O,C,O,4,0),COLORFFFF00;
STICKLINE(KK=0 AND C>O,C,O,4,1),COLORFFFF00;
STICKLINE(KK=-5,H,L,0.1,0),,COLORFF0000;
STICKLINE(KK=-5 AND C>O,C,O,4,1),COLORFF0000;
STICKLINE(KK=-5 AND C<O,C,O,4,0),COLORFF0000;
DRAWTEXT_FIX(1,0.5,0,0,'红色K线为多头区域'),COLORRED;
DRAWTEXT_FIX(1,0.5,0.04,0,'青色K线为混沌区域'),COLORFFFF00;
DRAWTEXT_FIX(1,0.5,0.08,0,'蓝色K线为空头区域'),COLORFF0000;
DRAWTEXT_FIX(1,0.5,0.12,0,'红色建仓,青色减仓!'),COLORFF00FF;




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

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

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

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