通达信MACD趋势强弱副图公式源码

B:=ZIG(3,15/5)*100,COLORWHITE;

G:=MA(B,2),COLORYELLOW;

D:=CROSS(B,G)*1000,COLORRED;

W:=CROSS(G,B)*1000,COLORBLUE;

VAR1:=(H+L)/2;

AO:=SMA(VAR1,5,1)-SMA(VAR1,34,1);

AC:SMA((AO-SMA(AO,5,1)),5,1),COLOR6699CC;

STICKLINE(AC>=REF(AC,1),0,AC,6,1),COLORGRAY,LINETHICK5;

STICKLINE(AC<=REF(AC,1),0,AC,6,1),COLORGREEN;

AC,COLORGREEN,LINETHICK5;

DIFF:EMA(CLOSE,12) - EMA(CLOSE,26),COLORWHITE;

DEA:EMA(DIFF,9),COLORYELLOW;

DRAWICON(CROSS(DIFF,DEA),DEA*1.02,1);

DRAWICON(CROSS(DEA,DIFF),DEA*0.98,2);

持仓段:=0,COLOR00CFFF;

空仓段:=0,COLORFFCCFF;

STICKLINE(DIFF>DEA,-0.01,-0.02,10,1),COLORRED,LINETHICK5;

STICKLINE(DIFF<DEA,-0.01,-0.02,10,1),COLORGREEN,LINETHICK5;

建仓:IF(DIFF<0,DIFF,0),COLORYELLOW,LINETHICK2;

加仓:IF(DIFF<0,0,DIFF),COLORRED,LINETHICK2;

白线破仓:IF(DIFF<DEA,DIFF,DEA),COLORWHITE,LINETHICK2;

趋势强弱:IF(DIFF>DEA,DEA,DEA),COLORFF937F,LINETHICK2;

遵:IF(DIFF>=DEA,DIFF,DRAWNULL),COLORRED,LINETHICK3;

守:IF(DEA>=DIFF,DEA,DRAWNULL),COLORFF9900,LINETHICK3;

纪:IF(DIFF>=DEA,DEA,DRAWNULL),COLOR00FFFF,LINETHICK3;

律:IF(DEA>=DIFF,DIFF,DRAWNULL),COLOR00FF00,LINETHICK3;

F1:=ZIG(3,5);

尖顶买入:ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<REF(ZIG

(3,10),2),COLORRED,LINETHICK2;

尖顶卖出:ZIG(3,10)<REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>

REF(ZIG(3,10),2),COLORGREEN,LINETHICK2;

DRAWTEXT(尖顶买入=1,0.8,'入'),COLORRED;

DRAWTEXT(尖顶卖出=1,0.8,'出'),COLORGREEN;

抄底: IF(TROUGHBARS(2,5,1)=0 AND HIGH>LOW+0.01,0.50,0),COLORYELLOW ,LINETHICK2 ;

DRAWTEXT(抄底=0.50,0.60,'抄底'),COLORRED;





未来函数检测结果如下:
该公式包含未来函数:ZIG
该公式包含未来函数:TROUGH
该公式包含未来函数:TROUGHBARS
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式

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

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