把周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;