通达信王子操盘线源码副图

2016-03-31 21:20:00来源:本站整理浏览:689

DRAWGBK(C>0, RGB(40,120,20),RGB(00,00,00),0,0,1),LINETHICK2;
{黄金率坐标系----用低\高位价*黄金分割率}
周期:=30; {设为参数1: N(30,480,240),是可见的周期数,自己调}
开关:=4; {设为参数2: M(1,4,4),自己调,缺省4(都显示)}
{1只显示以低点为基准的分割点, 2只显示以高点为基准的分割点,
3只显示以高低差为基准的分割点,4同时显示以上三种情况,时间坐标始终都显示 }
均价:AMOUNT/VOL/100,NODRAW;
假阴1:=O>C AND 均价>REF(C,1);
DRAWTEXT(假阴1,L-0.2,'↖假阴'1),COLORMAGENTA;
STICKLINE(假阴1,O,C,1,0),COLORRED;
DRAWICON(C<O AND C>REF(C,1),H,6),LINETHICK2;
STICKLINE(C<O AND C>REF(C,1),H,L,0,0)COLORMAGENTA,LINETHICK2;
STICKLINE(C<O AND C>REF(C,1),O,C,3,0)COLORMAGENTA,LINETHICK2;
DRAWTEXT_FIX(ISLASTBAR,0,2,0,HYBLOCK);{在屏幕左上角显示所属行业板块}
DRAWTEXT_FIX(ISLASTBAR,0.31,0,0,DYBLOCK);{在屏幕左上角显示所属地域板块}
DRAWTEXT_FIX(ISLASTBAR,0.38,0,0,GNBLOCK);{在屏幕左上角显示所属概念板块}
{跳空}
STICKLINE(REF(L,1)>H,H,REF(L,1),5,0),COLORGRAY;
STICKLINE(REF(H,1)<L,L,REF(H,1),5,0),COLORGRAY;
现价线: CONST(C),COLORLIRED,POINTDOT,LINETHICK2;{现价线}
高1:=CONST(HHV(H,周期)); 低1:=CONST(LLV(L,周期)); H_L:=高1-低1;{阶段高低差}
顶: 高1,COLORRED,POINTDOT;
底: 低1,COLORGREEN,POINTDOT;

{王子操盘线}
MA6: MA(C,6),COLORGREEN,LINETHICK2;
MA6_: IF(MA6>=REF(MA6,1),MA6,DRAWNULL),COLORLIGRAY,LINETHICK2;

{==========时间坐标====以阶段低点为基准=====白字======}
LTJ:= L=低1;
LSJ:=BARSLAST(LTJ)+1;
L00:=低1+H_L*0.01;
DRAWTEXT(LSJ=5,L00,'5');
DRAWTEXT(LSJ=8,L00,'8');
DRAWTEXT(LSJ=13,L00,'13');
DRAWTEXT(LSJ=21,L00,'21');
DRAWTEXT(LSJ=34,L00,'34');
DRAWTEXT(LSJ=55,L00,'55');
DRAWTEXT(LSJ=89,L00,'89');
DRAWTEXT(LSJ=144,L00,'144');
DRAWTEXT(LSJ=233,L00,'233');
N01:=10;
T01:=CONST(HHVBARS(V,10)),COLOR0000FF,LINETHICK1;
量能平台:IF(CURRBARSCOUNT<=N01+15,CONST(IF(T01=0,C,REF(C,T01))),DRAWNULL)
,COLORLIBLUE,LINETHICK4;

DRAWTEXT(ISLASTBAR,量能平台,' 量能平台'),COLOR00F0F0;
HV:=HHV(V,5)=V OR V/REF(V,1)>=5;
FT:=BARSLAST(HV);
量能平台1:=IF(HV,C,REF(C,FT));
DRAWTEXT(量能平台1>REF(量能平台1,1)AND C<REF(C,1),L,'*跌'),COLORGREEN;
DRAWTEXT(量能平台1<REF(量能平台1,1) AND C>REF(C,1),L,'*买'),COLORYELLOW;
DRAWTEXT(量能平台1>REF(量能平台1,1) AND C>REF(C,1) AND C>MA(C,13) AND C=HHV(C,20) AND C/REF(C,1)>1.05,L,'*买'),COLORFFFFFF;
N:=3;{原码 P1:=3;}
A1:=REF(H,N)=HHV(H,2*N+1);
B1:=FILTER(A1,N);
C18:=BACKSET(B1,N+1);
D1:=FILTER(C18,N);{高点}
A2:=REF(L,N)=LLV(L,2*N+1);
B2:=FILTER(A2,N);
C2:=BACKSET(B2,N+1);
D2:=FILTER(C2,N);{低点}
E1:=(REF(LLV(L,2*N),1)+REF(HHV(H,2*N),1))/2;
E2:=(H+L)/2;{高低点出现在同一K线上时可作取舍}
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(C)=1;
L1:=(D2 AND NOT(D1 AND E1<E2));
H2:=D1 AND NOT(D2 AND E1>=E2);X1:=REF(BARSLAST(H1),1)+1;
F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,L,10000),X1));
G1:=F1>REF(F1,1); I1:=BACKSET(G1,2);
LD:=I1>REF(I1,1),LINETHICK0;{过滤后低点}
L2:=LD OR ISLASTBAR OR BARSCOUNT(C)=1;
X2:=REF(BARSLAST(L2),1)+1;
F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,H,0),X2));
G2:=F2>REF(F2,1);
I2:=BACKSET(G2,2);
HD:=I2>REF(I2,1),LINETHICK0;{过滤后高点}
R1:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);
S1:=R1>REF(R1,1); {前一高}
T1:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);
U1:=T1>REF(T1,1); {前一低}
R2:=BACKSET(S1,REF(BARSLAST(HD),1)+2);
S2:=R2>REF(R2,1); {前二高}
T2:=BACKSET(U1,REF(BARSLAST(LD),1)+2);
U2:=T2>REF(T2,1); {前二低}
T3:=BACKSET(U2,REF(BARSLAST(LD),1)+2);
U3:=T3>REF(T3,1); {前三低}
T4:=BACKSET(U3,REF(BARSLAST(LD),1)+2);
U4:=T4>REF(T4,1); {前四低}
R3:=BACKSET(S2,REF(BARSLAST(HD),1)+2);
S3:=R3>REF(R3,1); {前三高}
R4:=BACKSET(S3,REF(BARSLAST(HD),1)+2);
S4:=R4>REF(R4,1); {前四高}
★压力1:DRAWLINE(S2,H,S1,H,1),COLORYELLOW,LINETHICK3;

★压力2:DRAWLINE(S3,H,S2,H,1),COLORFF8000,LINETHICK3;

★压力3:DRAWLINE(S4,H,S3,H,1),COLOR0000FF,LINETHICK2;
★支撑3:DRAWLINE(U4,L,U3,L,1),COLOR0000FF,LINETHICK2;
日A1:=YEAR=2012 AND MONTH=12 AND DAY=07 AND C>1000;
日B1:=YEAR=2013 AND MONTH=01 AND DAY=25 AND C>1000;
X1207: DRAWLINE(日A1,C,日B1,L,1),COLORLIGREEN;
年:=YEAR=2011; 月:= MONTH=6;
日0624:=年 AND 月 AND DAY=24;
日0627:=年 AND 月 AND DAY=27;
日0628:=年 AND 月 AND DAY=28;
日0629:=年 AND 月 AND DAY=29;
G: DRAWLINE(日0624,C,日0627,C,1),COLORMAGENTA;{灯塔线G};
A: DRAWLINE(日0624,C,日0628,O,1),COLORLIRED;{灯塔线A};
B: DRAWLINE(日0624,C,日0629,O,1),COLORYELLOW;{灯塔线B};
C1: DRAWLINE(日0624,C,日0627,L,1),COLORGREEN;{灯塔线C};
D: DRAWLINE(日0624,C,日0629,C,1),COLORLICYAN;{灯塔线D};
DRAWTEXT(ISLASTBAR,G,'G'),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,A,'A'),COLORLIRED;
DRAWTEXT(ISLASTBAR,B,'B'),COLORYELLOW;

[1] [2] [3]  下一页

股票公式栏目导航

精品指标推荐

最新热门

本类随机推荐

相关公式