MACD升级(源码、副图、通达信、贴图)

源码

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

DEA:=EMA(DIFF,9);

MACD:=2*(DIFF-DEA),STICK;

STICKLINE(DIFF<0,0,DIFF,2,0),COLORGREEN;

STICKLINE(DIFF>=0,0,DIFF,2,0),COLORRED;

STICKLINE(DEA>=0,0,DEA,2,-1),COLOR0000CC;

STICKLINE(DEA<0,0,DEA,2,-1),COLORGREEN;

柱1:=IF(DIFF>DEA,DIFF,0),COLORRED;

柱2:=IF(DEA<DIFF,DEA,0),COLORMAGENTA;

DRAWICON(CROSS(DIFF,DEA),柱2,1);

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

M:=9; SHORT:=12;LONG:=26;

JCSC:=(M-1)/(M+1)*DEA/(1-2/(M+1));

DD:=(MACD/2+(DEA*(M-1)/(M+1)))/(1-2/(M+1));{计算出明日MACD=MACD时的DIFF值}

DIF拐头价:=(DIFF*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1)))COLORCYAN,LINETHICK3;

柱变向价:=(DD*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1))),COLORGREEN;

DRAWTEXT_FIX(1,0.9,0.94,0,STRCAT('1: ',CON2STR(DIF拐头价,2))),COLORYELLOW;

DRAWNUMBER(DIFF>DEA,3,BARSLAST(CROSS(DIFF,DEA))+1),COLORRED,NODRAW;

DRAWNUMBER(DIFF<DEA,-1,BARSLAST(CROSS(DEA,DIFF))+1),COLORGREEN,NODRAW;

VA:=IF(CLOSE>REF(CLOSE,1),VOL,-VOL);

OBV1:=SUM(IF(CLOSE=REF(CLOSE,1),0,VA),0);

OBV2:=EMA(OBV1,3)-MA(OBV1,9);

OBV3:=EMA(IF(OBV2>0,OBV2,0),3);

MAC3:=MA(C,3);

STICKLINE(OBV3>REF(OBV3,1) AND MAC3>REF(MAC3,1),0,DEA/4,2,0),COLORYELLOW;




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

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

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

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