通达信五K看盘主图源码(重发)
-
相关简介:通达信公式五K看盘主图 TJ1:=EVERY(CO,2) AND HREF(H,1) AND LREF(L,1); XG1:=REF(TJ1,1) AND CO AND CREF(HHV(H,2),1) AND H=HHV(H,3); Q1:=BACKSET(XG1,3); T1:=BARSLAST(CROSS(Q1=1,0.5)); DRAWLINE(T1=0,REFX(HHV(H,3),BARSNEXT(XG1)),XG1,HHV(H,3),0),COLORMAGENTA; DRAWLINE
-
文章来源:股海网作者:股海网发布时间:2019-07-17浏览次数:
通达信公式五K看盘主图
TJ1:=EVERY(C<O,2) AND H<REF(H,1) AND L<REF(L,1);
XG1:=REF(TJ1,1) AND C>O AND C>REF(HHV(H,2),1) AND H=HHV(H,3);
Q1:=BACKSET(XG1,3);
T1:=BARSLAST(CROSS(Q1=1,0.5));
DRAWLINE(T1=0,REFX(HHV(H,3),BARSNEXT(XG1)),XG1,HHV(H,3),0),COLORMAGENTA;
DRAWLINE(T1=0,REFX(LLV(L,3),BARSNEXT(XG1)),XG1,LLV(L,3),0),COLORMAGENTA;
STICKLINE(T1=0,REFX(HHV(H,3),BARSNEXT(XG1)),REFX(LLV(L,3),BARSNEXT(XG1)),0,0),COLORMAGENTA;
STICKLINE(XG1,HHV(H,3),LLV(L,3),0,0),COLORMAGENTA;
TJ2:=EVERY(C>O,2) AND H>REF(H,1) AND L>REF(L,1);
XG2:=REF(TJ2,1) AND C<O AND C<REF(LLV(L,2),1) AND L=LLV(L,3);
Q2:=BACKSET(XG2,3);
T2:=BARSLAST(CROSS(Q2=1,0.5));
DRAWLINE(T2=0,REFX(HHV(H,3),BARSNEXT(XG2)),XG2,HHV(H,3),0),COLORYELLOW;
DRAWLINE(T2=0,REFX(LLV(L,3),BARSNEXT(XG2)),XG2,LLV(L,3),0),COLORYELLOW;
STICKLINE(T2=0,REFX(HHV(H,3),BARSNEXT(XG2)),REFX(LLV(L,3),BARSNEXT(XG2)),0,0),COLORYELLOW;
STICKLINE(XG2,HHV(H,3),LLV(L,3),0,0),COLORYELLOW;
XG3:=REF(XG1,1) AND C>O AND C>REF(HHV(H,3),1) AND H=HHV(H,4);
Q3:=BACKSET(XG3,4);
T3:=BARSLAST(CROSS(Q3=1,0.5));
DRAWLINE(T3=0,REFX(HHV(H,4),BARSNEXT(XG3)),XG3,HHV(H,4),0),COLORLIRED;
DRAWLINE(T3=0,REFX(LLV(L,4),BARSNEXT(XG3)),XG3,LLV(L,4),0),COLORLIRED;
STICKLINE(T3=0,REFX(HHV(H,4),BARSNEXT(XG3)),REFX(LLV(L,4),BARSNEXT(XG3)),0,0),COLORLIRED;
STICKLINE(XG3,HHV(H,4),LLV(L,4),0,0),COLORLIRED;
XG4:=REF(XG2,1) AND C<O AND C<REF(LLV(L,3),1) AND L=LLV(L,4);
Q4:=BACKSET(XG4,4);
T4:=BARSLAST(CROSS(Q4=1,0.5));
DRAWLINE(T4=0,REFX(HHV(H,4),BARSNEXT(XG4)),XG4,HHV(H,4),0),COLORBLUE;
DRAWLINE(T4=0,REFX(LLV(L,4),BARSNEXT(XG4)),XG4,LLV(L,4),0),COLORBLUE;
STICKLINE(T4=0,REFX(HHV(H,4),BARSNEXT(XG4)),REFX(LLV(L,4),BARSNEXT(XG4)),0,0),COLORBLUE;
STICKLINE(XG4,HHV(H,4),LLV(L,4),0,0),COLORBLUE;
XG5:=REF(XG3,1) AND C>O AND C>REF(HHV(H,4),1) AND H=HHV(H,5);
Q5:=BACKSET(XG5,5);
T5:=BARSLAST(CROSS(Q5=1,0.5));
DRAWLINE(T5=0,REFX(HHV(H,5),BARSNEXT(XG5)),XG5,HHV(H,5),0),COLORRED;
DRAWLINE(T5=0,REFX(LLV(L,5),BARSNEXT(XG5)),XG5,LLV(L,5),0),COLORRED;
STICKLINE(T5=0,REFX(HHV(H,5),BARSNEXT(XG5)),REFX(LLV(L,5),BARSNEXT(XG5)),0,0),COLORRED;
STICKLINE(XG5,HHV(H,5),LLV(L,5),0,0),COLORRED;
XG6:=REF(XG4,1) AND C<O AND C<REF(LLV(L,4),1) AND L=LLV(L,5);
Q6:=BACKSET(XG6,5);
T6:=BARSLAST(CROSS(Q6=1,0.5));
DRAWLINE(T6=0,REFX(HHV(H,5),BARSNEXT(XG6)),XG6,HHV(H,5),0),COLORGREEN;
DRAWLINE(T6=0,REFX(LLV(L,5),BARSNEXT(XG6)),XG6,LLV(L,5),0),COLORGREEN;
STICKLINE(T6=0,REFX(HHV(H,5),BARSNEXT(XG6)),REFX(LLV(L,5),BARSNEXT(XG6)),0,0),COLORGREEN;
STICKLINE(XG6,HHV(H,5),LLV(L,5),0,0),COLORGREEN;
A:="玫红框:三K看转强";
A1:="浅红框:四K判转多";
A2:="大红框:五K抓涨势";
B:="黄色框:三K看转弱";
B1:="蓝色框:四K判转空";
B2:="绿色框:五K抓跌势";
DRAWTEXT_FIX(ISLASTBAR,0.005,0,0,A),COLORMAGENTA;
DRAWTEXT_FIX(ISLASTBAR,0.005,0.1,0,A1),COLORLIRED;
DRAWTEXT_FIX(ISLASTBAR,0.005,0.2,0,A2),COLORRED;
DRAWTEXT_FIX(ISLASTBAR,0.12,0,0,B),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0.12,0.1,0,B1),COLORBLUE;
DRAWTEXT_FIX(ISLASTBAR,0.12,0.2,0,B2),COLORGREEN;
============以上源码,有错误,谢谢网友反馈,修改源码如下:
{马到功成主图}
{主图}
TJ1:=EVERY(C<O,2) AND H<REF(H,1) AND L<REF(L,1);
XG1:=REF(TJ1,1) AND C>O AND C>REF(HHV(H,2),1) AND H=HHV(H,3);
Q1:=BACKSET(XG1,3);
T1:=BARSLAST(CROSS(Q1=1,0.5));
DRAWLINE(T1=0,REFX(HHV(H,3),BARSNEXT(XG1)),XG1,HHV(H,3),0),COLORMAGENTA;
DRAWLINE(T1=0,REFX(LLV(L,3),BARSNEXT(XG1)),XG1,LLV(L,3),0),COLORMAGENTA;
STICKLINE(T1=0,REFX(HHV(H,3),BARSNEXT(XG1)),REFX(LLV(L,3),BARSNEXT(XG1)),0,0),COLORMAGENTA;
STICKLINE(XG1,HHV(H,3),LLV(L,3),0,0),COLORMAGENTA;
TJ2:=EVERY(C>O,2) AND H>REF(H,1) AND L>REF(L,1);
XG2:=REF(TJ2,1) AND C<O AND C<REF(LLV(L,2),1) AND L=LLV(L,3);
Q2:=BACKSET(XG2,3);
T2:=BARSLAST(CROSS(Q2=1,0.5));
DRAWLINE(T2=0,REFX(HHV(H,3),BARSNEXT(XG2)),XG2,HHV(H,3),0),COLORYELLOW;
DRAWLINE(T2=0,REFX(LLV(L,3),BARSNEXT(XG2)),XG2,LLV(L,3),0),COLORYELLOW;
STICKLINE(T2=0,REFX(HHV(H,3),BARSNEXT(XG2)),REFX(LLV(L,3),BARSNEXT(XG2)),0,0),COLORYELLOW;
STICKLINE(XG2,HHV(H,3),LLV(L,3),0,0),COLORYELLOW;
XG3:=REF(XG1,1) AND C>O AND C>REF(HHV(H,3),1) AND H=HHV(H,4);
Q3:=BACKSET(XG3,4);
T3:=BARSLAST(CROSS(Q3=1,0.5));
DRAWLINE(T3=0,REFX(HHV(H,4),BARSNEXT(XG3)),XG3,HHV(H,4),0),COLORLIRED;
DRAWLINE(T3=0,REFX(LLV(L,4),BARSNEXT(XG3)),XG3,LLV(L,4),0),COLORLIRED;
STICKLINE(T3=0,REFX(HHV(H,4),BARSNEXT(XG3)),REFX(LLV(L,4),BARSNEXT(XG3)),0,0),COLORLIRED;
STICKLINE(XG3,HHV(H,4),LLV(L,4),0,0),COLORLIRED;
XG4:=REF(XG2,1) AND C<O AND C<REF(LLV(L,3),1) AND L=LLV(L,4);
Q4:=BACKSET(XG4,4);
{}
T4:=BARSLAST(CROSS(Q4=1,0.5));
DRAWLINE(T4=0,REFX(HHV(H,4),BARSNEXT(XG4)),XG4,HHV(H,4),0),COLORBLUE;
DRAWLINE(T4=0,REFX(LLV(L,4),BARSNEXT(XG4)),XG4,LLV(L,4),0),COLORBLUE;
STICKLINE(T4=0,REFX(HHV(H,4),BARSNEXT(XG4)),REFX(LLV(L,4),BARSNEXT(XG4)),0,0),COLORBLUE;
STICKLINE(XG4,HHV(H,4),LLV(L,4),0,0),COLORBLUE;
XG5:=REF(XG3,1) AND C>O AND C>REF(HHV(H,4),1) AND H=HHV(H,5);
Q5:=BACKSET(XG5,5);
T5:=BARSLAST(CROSS(Q5=1,0.5));
DRAWLINE(T5=0,REFX(HHV(H,5),BARSNEXT(XG5)),XG5,HHV(H,5),0),COLORRED;
DRAWLINE(T5=0,REFX(LLV(L,5),BARSNEXT(XG5)),XG5,LLV(L,5),0),COLORRED;
STICKLINE(T5=0,REFX(HHV(H,5),BARSNEXT(XG5)),REFX(LLV(L,5),BARSNEXT(XG5)),0,0),COLORRED;
STICKLINE(XG5,HHV(H,5),LLV(L,5),0,0),COLORRED;
XG6:=REF(XG4,1) AND C<O AND C<REF(LLV(L,4),1) AND L=LLV(L,5);
Q6:=BACKSET(XG6,5);
T6:=BARSLAST(CROSS(Q6=1,0.5));
{}
DRAWLINE(T6=0,REFX(HHV(H,5),BARSNEXT(XG6)),XG6,HHV(H,5),0),COLORGREEN;
DRAWLINE(T6=0,REFX(LLV(L,5),BARSNEXT(XG6)),XG6,LLV(L,5),0),COLORGREEN;
STICKLINE(T6=0,REFX(HHV(H,5),BARSNEXT(XG6)),REFX(LLV(L,5),BARSNEXT(XG6)),0,0),COLORGREEN;
STICKLINE(XG6,HHV(H,5),LLV(L,5),0,0),COLORGREEN;
{}
{
A:="玫红框:三K看转强";
A1:="浅红框:四K判转多";
A2:="大红框:五K抓涨势";
B:="黄色框:三K看转弱";
B1:="蓝色框:四K判转空";
B2:="绿色框:五K抓跌势";
}
DRAWTEXT_FIX(ISLASTBAR,0.005,0,0,'玫红框:三K看转强'),COLORMAGENTA;
DRAWTEXT_FIX(ISLASTBAR,0.005,0.1,0,'浅红框:四K判转多'),COLORLIRED;
DRAWTEXT_FIX(ISLASTBAR,0.005,0.2,0,'大红框:五K抓涨势'),COLORRED;
DRAWTEXT_FIX(ISLASTBAR,0.12,0,0,'黄色框:三K看转弱'),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0.12,0.1,0,'蓝色框:四K判转空'),COLORBLUE;
DRAWTEXT_FIX(ISLASTBAR,0.12,0.2,0,'绿色框:五K抓跌势'),COLORGREEN;