设为首页加入收藏

微信关注
官方微信号:71712643
加关注获取每日精选资讯
股票入门欢迎您加入
广告服务联系我们网站地图

飞狐关于均线乖离双周期显示副图公式源码是什么?

2016-4-29 13:51:24 股票入门 http://rumen.southmoney.com

飞狐关于均线乖离双周期显示副图公式源码是什么?附:飞狐速阻主图公式源码  南方财富网小编为您提供


【飞狐关于均线乖离双周期显示副图公式源码】

为了使均线乖离在一个图显示二个周期的乖离情况,便于短长结合分析,而做此指标,当参数N为1时,显示的短周期乖离,调整参数N为2或0时,则显示的长周期均线乖离.而均线的长短则由自己决定.
WRAP: break-word; WHITE-SPACE: normal; TEXT-TRANSFORM: none; WORD-SPACING: 0px; COLOR: rgb(51,51,51); PADDING-BOTTOM: 0px; PADDING-TOP: 0px; FONT: 14px/24px 宋体, arial, sans-serif, 'DejaVu Sans', 'Lucida Grande', Tahoma, 'Hiragino Sans GB', STHeiti, SimSun, sans-serif; PADDING-LEFT: 0px; MARGIN: 0px; WIDOWS: 1; LETTER-SPACING: normal; PADDING-RIGHT: 0px; TEXT-INDENT: 0px; -webkit-text-stroke-width: 0px">这里的均线选择仅供参考.
均价:=(C+if(H=C,C,H)+if(L=C,C,L)+O)/4;
AAA:=(WMA(均价,2.5)+WMA(均价,5)+wMA(均价,10)+WMA(均价,20))/4;
lxx:=(REF(AAa,2)+REF(AAa,1)+REF(AAa,0))/3,COLORYELLOW;
AA:=(WMA(均价,5)+WMA(均价,10)+WMA(均价,20)+WMA(均价,30)+WMA(均价,60)+WMA(均价,120))/6;
轴心线:=(REF(AA,10)+REF(AA,5)+REF(AA,0))/3,COLORYELLOW,PRECISION2;
lx:=IF(n=1,lxx,轴心线);
go:=O-lx;
gh:=h-lx;
gl:=l-lx;
gc:=c-lx;
GK:(go+gh+gl+gc)/4,COLORWHITE;
mGK:wMA(GK,3),COLORYELLOW;
mGK3:wMA(MGK,3),COLORMAGENTA;
信号:IF(CROSS(MA(GK,2),0),MA(C,2),0),LINETHICK;
STICKLINE(GC>=GO,GL,GH,0.1,0),COLORRED; 
STICKLINE(GC>GO,GO,GC,6,0),COLORRED;
STICKLINE(GC>GO,GO,GC,2,0),COLORCC66FF;
STICKLINE(GC<GO,GO,GC,6,0),COLORAAAA00;
STICKLINE(GC<GO,GO,GC,2,0),COLORFFCCAA;
STICKLINE(GC<GO,GL,GH,0.1,0),COLORCYAN;
变线:0,COLORWHITE;

附:【飞狐速阻主图公式源码】

源码:
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;

更多飞狐公式源码相关资讯请关注南方财富网

股票入门声明:资讯来源于互联网,属作者个人观点,仅供投资者参考,并不构成投资建议。投资者据此操作,风险自担。