飞狐主图公式源码 飞狐速阻主图公式源码
2015-1-30 11:24:40 股票入门 http://rumen.southmoney.com
南方财富网带来飞狐主图公式源码 飞狐速阻主图公式源码:
源码:
input:n(16);
drawtext(sysparam(2)=barpos,c,‘板块:’+blkname),colorccffff,align4;
dd:=“xh-z.dd”(n);
gg:=“xh-z.gg”(n);
z:=dd*L+gg*h;
gd:=gg+dd;
DRAWICON(dd,z,12);
p:=SYSPARAM(1);
sgd:=sum(gd,0);
gds:=sgd[p]-sgd+1;
sb:=if(gds《1,1,gds);
sa:=(sb《ref(sb,1))*sb;
hb:=hhv((sa=1)*BARPOS,0);
q:=hb[p];
wgd:=ref(barslast(gd),1)+1;
DRAWICON(gd,dd*L+gg*h,12);
hgd:=if(gg,h,if(dd,L,0));
Lgd:=if(gg,ref(L,wgd),if(dd,ref(h,wgd),0));
yhL:=(hgd-Lgd)/4;
oo:=CROSS(BACKSET(q=BARPOS,wgd[q]+1),0.5);{定点}
qz:=(wgd[q])*4/3;{画斜线1}
w:=sumbars(gd,2)-1;
K1:=(hgd[q]-Lgd[q])/qz*4/3,LINETHICK0;
d1:ref(z,w)+k1*w,LINETHICK0,ColorFF6FB7;
K2:=(hgd[q]-Lgd[q])/qz/1.123,LINETHICK0;
d2:ref(z,w)+k2*w,LINETHICK0,ColorFF6FB7;
K3:=(hgd[q]-Lgd[q])/qz/2.246,LINETHICK0;
d3:ref(z,w)+k3*w,LINETHICK0,ColorFF6FB7;
DRAWSL(oo,Lgd[q],k1,0,0),LINETHICK1,ColorFF6FB7;
DRAWSL(oo,Lgd[q],k2,0,0),POINTDOT,ColorFF6FB7;
DRAWSL(oo,Lgd[q],k3,0,0),POINTDOT,ColorFF6FB7;
{画斜线2}
b1:=(Lgd[q]-hgd[q])/qz*4/3,LINETHICK0;
g1:ref(hgd[q],w)+b1*w,LINETHICK0,Color74AFFF;
b2:=(Lgd[q]-hgd[q])/qz/1.132,LINETHICK0;
g2:ref(hgd[q],w)+b2*w,LINETHICK0,Color74AFFF;
b3:=(Lgd[q]-hgd[q])/qz/2.246,LINETHICK0;
g3:ref(hgd[q],w)+b3*w,LINETHICK0,Color74AFFF;
DRAWSL(oo,hgd[q],b1,0,0),Color74AFFF,LINETHICK1;
DRAWSL(oo,hgd[q],b2,0,0),POINTDOT,Color74AFFF;
DRAWSL(oo,hgd[q],b3,0,0),POINTDOT,Color74AFFF;
i1:=‘斜率\nk1\n’+‘±’+NUMTOSTR(abs(k1)*100,3)+‘\nk2\n’+‘±’
+NUMTOSTR(abs(k2)*100,3)+‘\nk3\n’+‘±’+NUMTOSTR(abs(k3)*100,3);
DRAWTEXT(BARPOS=SYSPARAM(3)-15,h,i1),ALIGN4,SHIFT1,Color74AFFF;
股票入门声明:资讯来源于互联网,属作者个人观点,仅供投资者参考,并不构成投资建议。投资者据此操作,风险自担。