通达信日周月季K线主副同图源码

把周K 月K  季K放在三个幅图里面 连同主图的日线一起在日线级别里是不是能够更好判断趋势?应朋友要求写了一个 论坛也搜素了 周K放在日线图的有  月线 季线貌似没有(可能我没搜到)。如果您有更好的办法能够实现一图同时显示日周月季K线   请不要理睬我写的 不管怎样,需要的就下。高手和不需要的飘过   谢谢
 
三个副图  画线不一定精准 没有验证  后面高手继续改进 主要是周线因为国庆长假有一点点瑕疵
但大趋势还是能够判断走势  水平有限  多包涵

周K线幅图

OO:=O#WEEK;
CC:=C#WEEK;
HH:=H#WEEK;
LL:=L#WEEK;
A:=WEEKOFYEAR!=REF(WEEKOFYEAR,1);
QD:=BARSLAST(A);
ZD:=BARSLAST(REFX(QD=0,1));
CC1:=REFX(C,BARSNEXT(ZD=0));
TT:BARSNEXT(ZD=0)+1 NODRAW;
TTT:BARSLAST(CROSS(TT<=3,0.5))NODRAW;
DRAWLINE(QD=0 AND OO>CC1,OO,ZD=0 AND CC<OO,OO,0),COLORCYAN;
DRAWLINE(QD=0 AND OO<CC1,OO,ZD=0 AND CC>OO,OO,0),COLORRED;
DRAWLINE(QD=0 AND OO>CC1,CC,ZD=0 AND CC<OO,CC,0),COLORCYAN;
DRAWLINE(QD=0 AND OO<CC1,CC,ZD=0 AND CC>OO,CC,0),COLORRED;
DRAWLINE(QD=0 AND OO=CC1,OO,ZD=0 AND CC=OO,OO,0),COLORWHITE;
STICKLINE(TTT=0 AND OO<CC1,HH,MAX(CC,OO),0,0),COLORRED;
STICKLINE(TTT=0 AND OO<CC1,MIN(CC,OO),LL,0,0),COLORRED;
STICKLINE(TTT=0 AND OO>CC1,HH,MAX(CC,OO),0,0),COLORCYAN;
STICKLINE(TTT=0 AND OO>CC1,MIN(CC,OO),LL,0,0),COLORCYAN;
STICKLINE(TTT=0 AND OO=CC1,MIN(CC,OO),LL,0,0),COLORWHITE;
STICKLINE(TTT=0 AND OO=CC1,HH,MAX(CC,OO),0,0),COLORWHITE;
STICKLINE(QD=0 AND OO>CC1,CC,OO,0,0),COLORCYAN;
STICKLINE(ZD=0 AND CC<OO,CC,OO,0,0),COLORCYAN;
STICKLINE(QD=0 AND OO<CC1,CC,OO,0,0),COLORRED;
STICKLINE(ZD=0 AND CC>OO,CC,OO,0,0),COLORRED;
DRAWLINE(ZD=0 ,MAX(CC,OO),QD=0 ,MAX(CC1,OO),0),COLORBLACK;
DRAWLINE(ZD=0,MIN(CC,OO),QD=0 ,MIN(CC1,OO),0),COLORBLACK;

月K线幅图
OO:=O#MONTH;
CC:=C#MONTH;
HH:=H#MONTH;
LL:=L#MONTH;
A:=MONTH!=REF(MONTH,1);
QD:=BARSLAST(A);
ZD:=BARSLAST(REFX(QD=0,1));
CC1:=REFX(C,BARSNEXT(ZD=0));
TT:=BARSNEXT(ZD=0)+1;
TTT:=BARSLAST(CROSS(TT<=REF(TT,QD)/2,0.5));
DRAWLINE(QD=0 AND OO>CC1,OO,ZD=0 AND CC<OO,OO,0),COLORCYAN;
DRAWLINE(QD=0 AND OO<CC1,OO,ZD=0 AND CC>OO,OO,0),COLORRED;
DRAWLINE(QD=0 AND OO>CC1,CC,ZD=0 AND CC<OO,CC,0),COLORCYAN;
DRAWLINE(QD=0 AND OO<CC1,CC,ZD=0 AND CC>OO,CC,0),COLORRED;
DRAWLINE(QD=0 AND OO=CC1,OO,ZD=0 AND CC=OO,OO,0),COLORWHITE;
STICKLINE(TTT=0 AND OO<CC1,HH,MAX(CC,OO),0,0),COLORRED;
STICKLINE(TTT=0 AND OO<CC1,MIN(CC,OO),LL,0,0),COLORRED;
STICKLINE(TTT=0 AND OO>CC1,HH,MAX(CC,OO),0,0),COLORCYAN;
STICKLINE(TTT=0 AND OO>CC1,MIN(CC,OO),LL,0,0),COLORCYAN;
STICKLINE(TTT=0 AND OO=CC1,MIN(CC,OO),LL,0,0),COLORWHITE;
STICKLINE(TTT=0 AND OO=CC1,HH,MAX(CC,OO),0,0),COLORWHITE;
STICKLINE(QD=0 AND OO>CC1,CC,OO,0,0),COLORCYAN;
STICKLINE(ZD=0 AND CC<OO,CC,OO,0,0),COLORCYAN;
STICKLINE(QD=0 AND OO<CC1,CC,OO,0,0),COLORRED;
STICKLINE(ZD=0 AND CC>OO,CC,OO,0,0),COLORRED;
DRAWLINE(ZD=0 ,MAX(CC,OO),QD=0 ,MAX(CC1,OO),0),COLORBLACK;
DRAWLINE(ZD=0,MIN(CC,OO),QD=0 ,MIN(CC1,OO),0),COLORBLACK;
季K线幅图
OO:=O#SEASON;
CC:=C#SEASON;
HH:=H#SEASON;
LL:=L#SEASON;
A0:=MOD(MONTH,3);
JD:=BARSLAST(CROSS(A0,0.5))+1;
A:=JD<REF(JD,1);
QD:=BARSLAST(A);
ZD:=BARSLAST(REFX(QD=0,1));
CC1:=REFX(C,BARSNEXT(ZD=0));
TT:=BARSNEXT(ZD=0)+1;
TTT:=BARSLAST(CROSS(TT<=REF(TT,QD)/2,0.5));
DRAWLINE(QD=0 AND OO>CC1,OO,ZD=0 AND CC<OO,OO,0),COLORCYAN;
DRAWLINE(QD=0 AND OO<CC1,OO,ZD=0 AND CC>OO,OO,0),COLORRED;
DRAWLINE(QD=0 AND OO>CC1,CC,ZD=0 AND CC<OO,CC,0),COLORCYAN;
DRAWLINE(QD=0 AND OO<CC1,CC,ZD=0 AND CC>OO,CC,0),COLORRED;
DRAWLINE(QD=0 AND OO=CC1,OO,ZD=0 AND CC=OO,OO,0),COLORWHITE;
STICKLINE(TTT=0 AND OO<CC1,HH,MAX(CC,OO),0,0),COLORRED;
STICKLINE(TTT=0 AND OO<CC1,MIN(CC,OO),LL,0,0),COLORRED;
STICKLINE(TTT=0 AND OO>CC1,HH,MAX(CC,OO),0,0),COLORCYAN;
STICKLINE(TTT=0 AND OO>CC1,MIN(CC,OO),LL,0,0),COLORCYAN;
STICKLINE(TTT=0 AND OO=CC1,MIN(CC,OO),LL,0,0),COLORWHITE;
STICKLINE(TTT=0 AND OO=CC1,HH,MAX(CC,OO),0,0),COLORWHITE;
STICKLINE(QD=0 AND OO>CC1,CC,OO,0,0),COLORCYAN;
STICKLINE(ZD=0 AND CC<OO,CC,OO,0,0),COLORCYAN;
STICKLINE(QD=0 AND OO<CC1,CC,OO,0,0),COLORRED;
STICKLINE(ZD=0 AND CC>OO,CC,OO,0,0),COLORRED;
DRAWLINE(ZD=0 ,MAX(CC,OO),QD=0 ,MAX(CC1,OO),0),COLORBLACK;
DRAWLINE(ZD=0,MIN(CC,OO),QD=0 ,MIN(CC1,OO),0),COLORBLACK;

 




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

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

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