通达信MACD画框主图指标公式

M:=macd.MacD;
JT:=BArslAST(crOSS(M,0));
ST:=BARSLAST(CROSS(0,M));
Q1:=BACKSET(ST=0,2);
QT:=BARSLAST(CROSS(Q1=1,0.5));
QQT:=BACKSET(QT=0,JT+1);
QT2:=BARSLAST(CROSS(Q1=1,0.5));
HH:=HHV(H,JT+1);
LL:=LLV(L,JT+1);
XJH:=REFX(HH,BARSNEXT(QT2=0));
XJL:=REFX(LL,BARSNEXT(QT2=0));
SQ1:=BACKSET(JT=0,2);
SQT:=BARSLAST(CROSS(SQ1=1,0.5));
SQQT:=BACKSET(SQT=0,ST+1);
SQT2:=BARSLAST(CROSS(SQ1=1,0.5));
SHH:=HHV(H,ST+1);
SLL:=LLV(L,ST+1);
XSH:=REFX(SHH,BARSNEXT(SQT2=0));
XSL:=REFX(SLL,BARSNEXT(SQT2=0));
TJ1:=CONST(M)>0 AND CURRBARSCOUNT=CONST(JT)+1;
TJ2:=CONST(M)<0 AND CURRBARSCOUNT=CONST(ST)+1;
STICKLINE(QQT=1 AND M>0,XJH,XJH,4,-1),COLORMAGENTA;
STICKLINE(QQT=1 AND M>0,XJL,XJL,4,-1),COLORMAGENTA;
STICKLINE(JT=0,XJH,XJL,0,-1),COLORMAGENTA;
STICKLINE(QT2=0 AND ST>0,HH,LL,0,-1),COLORMAGENTA;
DRAWLINE(TJ1,CONST(HH),ISLASTBAR AND CONST(M)>0,HH,0),COLORMAGENTA,DOTLINE;
DRAWLINE(TJ1,CONST(LL),ISLASTBAR AND CONST(M)>0,LL,0),COLORMAGENTA,DOTLINE;
STICKLINE(CONST(M)>0 AND CURRBARSCOUNT=CONST(JT)+1,CONST(HH),CONST(LL),0,-1),COLORMAGENTA;
STICKLINE(CONST(M)>0 AND ISLASTBAR AND CONST(ST)>0,CONST(HH),CONST(LL),0,-1),COLORMAGENTA;
STICKLINE(SQQT=1 AND M<0,XSH,XSH,4,-1),COLORGREEN;
STICKLINE(SQQT=1 AND M<0,XSL,XSL,4,-1),COLORGREEN;
STICKLINE(ST=0,XSH,XSL,0,-1),COLORGREEN;
STICKLINE(SQT2=0,SHH,SLL,0,-1),COLORGREEN;
DRAWLINE(TJ2,CONST(SHH),ISLASTBAR AND CONST(M)<0,SHH,0),COLORGREEN,DOTLINE;
DRAWLINE(TJ2,CONST(SLL),ISLASTBAR AND CONST(M)<0,SLL,0),COLORGREEN,DOTLINE;
STICKLINE(CONST(M)<0 AND CURRBARSCOUNT=CONST(ST)+1,CONST(SHH),CONST(SLL),0,-1),COLORGREEN;
STICKLINE(CONST(M)<0 AND ISLASTBAR AND CONST(JT)>0,CONST(SHH),CONST(SLL),0,-1),COLORGREEN;




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

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

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