通达信MACD主图指标公式源码

DIFZ:=EMA(C,12)-EMA(C,26);
DEAZ:=EMA(DIFZ,9);
macdZ:=8*(DIFZ-DEAZ);
TYNNN:=60;
A1:=REF(HIGH,TYNNN)=HHV(HIGH,2*TYNNN+1); B1:=FILTER(A1,TYNNN);

C1:=BACKSET(B1,TYNNN+1); D1:=FILTER(C1,TYNNN);
A2:=REF(LOW,TYNNN)=LLV(LOW,2*TYNNN+1); B2:=FILTER(A2,TYNNN);
C2:=BACKSET(B2,TYNNN+1); D2:=FILTER(C2,TYNNN);
E1:=(REF(LLV(LOW,2*TYNNN),1)+REF(HHV(HIGH,2*TYNNN),1))/2;
E2:=(HIGH+LOW)/2;
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR
BARSCOUNT(CLOSE)=1;
L1:=(D2 AND NOT(D1 AND E1<E2));
X1:=REF(BARSLAST(H1),1)+1; F1:=BACKSET(H1 AND
COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1));
G1:=F1>REF(F1,1); I1:=BACKSET(G1,2); LD:=I1>REF(I1,1);
UU:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);
VV:=UU>REF(UU,1);
RCC:=REF(L,BARSLAST(VV));
DRAWBAND(DIFZ*4+RCC,RGB(155,50,50),EMA(DIFZ*4+RCC,9),RGB(0,50,150));{此句4.0以下版本要删除}
STICKLINE((RCC+MACDZ)>RCC AND
(RCC+MACDZ)<=REF(RCC+MACDZ,1),RCC,RCC+MACDZ,1,0),COLOR400080;
STICKLINE((RCC+MACDZ)>RCC AND
(RCC+MACDZ)>REF(RCC+MACDZ,1),RCC,RCC+MACDZ,1,0),COLOR00FFFF;
STICKLINE((RCC+MACDZ)<=RCC AND
(RCC+MACDZ)<=REF(RCC+MACDZ,1),RCC,RCC+MACDZ,1,0),COLOR008080;
STICKLINE((RCC+MACDZ)<=RCC AND
(RCC+MACDZ)>REF(RCC+MACDZ,1),RCC,RCC+MACDZ,1,0),COLORC080FF;
IF(C,EMA(DIFZ*4+RCC,9),DRAWNULL),COLORFFFFFF,LINETHICK1;
IF(C,DIFZ*4+RCC,DRAWNULL),COLORRED,LINETHICK1;
IF(DIFZ<=REF(DIFZ,1),DIFZ*4+RCC,DRAWNULL),COLORFFF000;
STICKLINE(C>O,H,L,0,0),COLORRED;
STICKLINE(C>O,C,O,3.1,1),COLORRED;
STICKLINE(C<=O,H,L,0,0),COLORCYAN;
STICKLINE(C<=O,C,O,3.1,1),COLORCYAN;
{均线状态}
MA5:MA(C,5);
MA10:MA(C,10);
MA20:MA(C,20);
MA30:MA(C,30);
MA60:MA(C,60);



未来函数检测结果如下:
该公式包含未来函数:BACKSET
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式

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

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