飞狐黄金分割副图指标
-
相关简介:飞狐黄金分割副图指标 源码 K:=1; {+} input:K(1,1,3); DRAWGBK(1, COLORRGB(100,100,100),COLORRGB(50,50,50),0); DRAWTEXT(BARPOS=SYSPARAM(2),HIGH,STKNAME+' \n所属板块: '+ BLKNAME),align4,COLORwhite; STICKLINE(C=O,C,O,8,0),COLOR0000AA; STICKLINE(C=O,C,O,6,0),COLOR0000b
-
文章来源:股海网作者:股海网发布时间:2016-06-21浏览次数:
飞狐黄金分割副图指标
源码
K:=1;
{+}
input:K(1,1,3);
DRAWGBK(1, COLORRGB(100,100,100),COLORRGB(50,50,50),0);
DRAWTEXT(BARPOS=SYSPARAM(2),HIGH,STKNAME+'
STICKLINE(C>=O,C,O,8,0),COLOR0000AA;
STICKLINE(C>=O,C,O,6,0),COLOR0000bb ;
STICKLINE(C>=O,C,O,4,0),COLOR0000cc ;
STICKLINE(C>=O,C,O,2,0),COLOR0000ee;
STICKLINE(C>=O,H,L,0,0),COLOR0000ff;
STICKLINE(C<=O,C,O,8,0),Color7B7b00;
STICKLINE(C<=O,C,O,6,0),Color909000;
STICKLINE(C<=O,C,O,4,0),ColorA8a800;
STICKLINE(C<=O,C,O,2,0),COLORcece00;
STICKLINE(C<=O,H,L,0,0),COLORffff00;
n1:=sysparam(3);
n:=n1-sysparam(2)+1;
hh:=hhv(H,n);
ll:=llv(L,n);
最高:=hh[n1],COLORYELLOW;
PARTLINE(C and K<>3,最高),COLORYELLOW;
最低:ll[n1],COLORred;
PARTLINE(C and K<>3,最低),COLORred;
PARTLINE(C and K=1,最低+(最高-最低)*0.191),LINEDOT,COLORWHITE;
PARTLINE(C and K=1,最低+(最高-最低)*0.382),LINEDOT,COLORWHITE;
PARTLINE(C and K<>3,最低+(最高-最低)*0.5),COLORGREEN;
PARTLINE(C and K=1,最低+(最高-最低)*0.618),LINEDOT,COLORWHITE;
PARTLINE(C and K=1,最低+(最高-最低)*0.809),LINEDOT,COLORWHITE;
DRAWTEXT(BARSCOUNT(C)=SYSPARAM(3) and K<>3,REF(最低,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'最低↓'),ALIGN2,COLORred;
DRAWTEXT(BARSCOUNT(C)=SYSPARAM(3) and K<>3,REF(最高,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'最高↑'),ALIGN2,COLORYELLOW;
DRAWTEXT(BARPOS=SYSPARAM(2) and K=1,REF((最低+(最高-最低)*0.191)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'黄金 0.191↑'+NUMTOSTR(最低+(最高-最低)*0.191,2)),COLORWHITE;
DRAWTEXT(BARPOS=SYSPARAM(2) and K=1,REF((最低+(最高-最低)*0.382)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'黄金 0.382↑'+NUMTOSTR(最低+(最高-最低)*0.382,2)),COLORWHITE;
DRAWTEXT(BARPOS=SYSPARAM(2) and K<>3,REF((最低+(最高-最低)*0.5)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'
DRAWTEXT(BARPOS=SYSPARAM(2) and K=1,REF((最低+(最高-最低)*0.618)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'黄金 0.618↑'+NUMTOSTR(最低+(最高-最低)*0.618,2)),COLORWHITE;
DRAWTEXT(BARPOS=SYSPARAM(2) and K=1,REF((最低+(最高-最低)*0.809)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'黄金 0.809↑'+NUMTOSTR(最低+(最高-最低)*0.809,2)),COLORWHITE;
PARTLINE(C and K=2,最低+(最高-最低)*1/8),LINEDOT,Color0095BC;
PARTLINE(C and K=2,最低+(最高-最低)*1/4),LINEDOT,Color0095BC;
PARTLINE(C and K=2,最低+(最高-最低)*3/8),LINEDOT,Color0095BC;
PARTLINE(C and K=2,最低+(最高-最低)*5/8),LINEDOT,Color0095BC;
PARTLINE(C and K=2,最低+(最高-最低)*7/8),LINEDOT,Color0095BC;
PARTLINE(C and K=2,最低+(最高-最低)*3/4),LINEDOT,Color0095BC;
DRAWTEXT(BARPOS=SYSPARAM(2) and K=2,REF((最低+(最高-最低)*1/8)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'江恩 1/8↑'+NUMTOSTR(最低+(最高-最低)*1/8,2)),Color0095BC;
DRAWTEXT(BARPOS=SYSPARAM(2) and K=2,REF((最低+(最高-最低)*1/4)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'江恩 1/4↑'+NUMTOSTR(最低+(最高-最低)*1/4,2)),Color0095BC;
DRAWTEXT(BARPOS=SYSPARAM(2) and K=2,REF((最低+(最高-最低)*3/8)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'江恩 3/8↑'+NUMTOSTR(最低+(最高-最低)*3/8,2)),Color0095BC;
DRAWTEXT(BARPOS=SYSPARAM(2) and K=2,REF((最低+(最高-最低)*5/8)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'江恩 5/8↑'+NUMTOSTR(最低+(最高-最低)*5/8,2)),Color0095BC;
DRAWTEXT(BARPOS=SYSPARAM(2) and K=2,REF((最低+(最高-最低)*7/8)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'江恩 7/8↑'+NUMTOSTR(最低+(最高-最低)*7/8,2)),Color0095BC;
DRAWTEXT(BARPOS=SYSPARAM(2) and K=2,REF((最低+(最高-最低)*3/4)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'江恩 3/4↑'+NUMTOSTR(最低+(最高-最低)*3/4,2)),Color0095BC;
P:=(C+H+L)/3;
R1:=2*P-L;
S1:=2*P-H;
R2:=P+(R1-S1);
S2:=P-(R1-S1);
SZ1:='压力2:'+NUMTOSTR(R2[SYSPARAM(1)],2)+'\n压力1:'+NUMTOSTR(R1[SYSPARAM(1)],2);
SZ2:='支撑1:'+NUMTOSTR(S1[SYSPARAM(1)],2)+'\n支撑2:'+NUMTOSTR(S2[SYSPARAM(1)],2);
DRAWTEXT(BARSCOUNT(C)=SYSPARAM(1),h*1.02,SZ1),ALIGN2,COLOREEBFFF;
DRAWTEXT(BARSCOUNT(C)=SYSPARAM(1),l*0.98,SZ2),ALIGN2,COLORFF9F93;