参数n:=8
{加权均线 }
a1:=(3*c+h+l+o)/6;
ar2:=(2*a1++ref(a1,2))/3;
ar3:=(3*a1+2*ref(a1,1)+ref(a1,3))/6;
ar5:=(5*a1+4*ref(a1,1)+3*ref(a1,2)+2*ref(a1,3)+ref(a1,5))/15;
ar8:=(8*a1+7*ref(a1,1)+6*ref(a1,2)+5*ref(a1,3)+4*ref(a1,4)+3*ref(a1,5)+2*ref(a1,6)+ref(a1,8))/36;
ar13:=(13*a1+12*ref(a1,1)+11*ref(a1,2)+10*ref(a1,3)+9*ref(a1,4)+8*ref(a1,5)+7*ref(a1,6)+6*ref(a1,7)+5*ref(a1,8)+4*ref(a1,9)+3*ref(a1,10)+2*ref(a1,11)+ref(a1,13))/91;
ar20:=(20*a1+19*ref(a1,1)+18*ref(a1,2)+17*ref(a1,3)+16*ref(a1,4)+15*ref(a1,5)+14*ref(a1,6)+13*ref(a1,7)+12*ref(a1,8)+11*ref(a1,9)+10*ref(a1,10)+9*ref(a1,11)+8*ref(a1,12)+7*ref(a1,13)+6*ref(a1,14)+5*ref(a1,15)+4*ref(a1,16)+3*ref(a1,17)+2*ref(a1,18)+ref(a1,20))/210;
bb:=ref(ar20,1);
var6:=(llv(ar8,2)+llv(ar8,4)+llv(ar8,6))/3;
短线:ar8,colorwhite,linethick3;
drawband(ar8,rgb(155,50,50),var6,rgb(250,250,0));
stickline(c>=o,c,o,3,0),color0000aa;
stickline(c>=o,c,o,2.5,0),color0000bb;
stickline(c>=o,c,o,2,0),color0000cc;
stickline(c>=o,c,o,1.5,0),color0000dd;
stickline(c>=o,c,o,1,0),color0000ee;
stickline(c>=o,c,o,0.5,0),color0000ff;
stickline(c>=o,h,l,0,0),color0000ff;
stickline(c<o,c,o,3,0),coloraaaa00;
stickline(c<o,c,o,2.5,0),colorbbbb00;
stickline(c<o,c,o,2,0),colorcccc00;
stickline(c<o,c,o,1.5,0),colordddd00;
stickline(c<o,c,o,1,0),coloreeee00;
stickline(c<o,c,o,0.5,0),colorffff00;
stickline(c<o,h,l,0,0),colorffff00;
中线:var6,colorffaaff,linethick2;
下跌:if(ar8=var6,var6, drawnull),colorgreen,linethick3;
多c:if(ar8>=bb,ar8,bb),coloree00ee,linethick1;
多c1:if(ar3>=bb,ar3,bb),colorffffff,linethick1;
多c2:if(ar5>=bb,ar5,bb),color00ffff,linethick1;
多c3:if(ar13>=bb,ar13,bb),color00ff00,linethick1;
多c4:if(ar20>=bb,ar20,bb),color0000ff,linethick1;
空c2:if(bb-ar20,bb,ar20),color00ff00,linethick2;
d11:if(ar3<ref(ar3,1) and ar3>bb,ar3,drawnull),linethick2,colorff0000;
d2:if(ar5<ref(ar5,1) and ar5>bb,ar5,drawnull),linethick2,colorff0000;
d3:if(ar13<ref(ar13,1) and ar13>bb,ar13,drawnull),linethick2,colorff0000;
d4:if(ar8<ref(ar8,1) and ar8>bb,ar8,drawnull),linethick2,colorff0000;
if(bb>ref(bb,1),bb,drawnull),linethick2,color00ffff;
var1111:=backset(ref(high,2)=hhv(high,5),3);
var2222:=cross(var1111,0.9);
var3333:=backset(ref(low,2)=llv(low,5),3);
var4444:=cross(var3333,0.9);
压力:= ref(high,barslast(var2222));
stickline(close,ref(high,barslast(var2222)),ref(high,barslast(var2222)),0.5,1),colorea91b5,linethick3;
支撑:= ref(low,barslast(var4444));
stickline(close,ref(low,barslast(var4444)),ref(low,barslast(var4444)),0.5,1),color00b4ff,linethick3;
aa05:=ma(c,5),color0099cc;
五日乖离率:=(c-aa05)/aa05*100;
bb05:=atan((aa05/ref(aa05,1)-1)*100)*180/3.1416;
速度5:=sma(ema((aa05-ref(aa05,1))/ref(aa05,1),3)*100,3,1);
加速度5:ema((速度5-ref(速度5,1)),3),nodraw;
aa10:=ma(c,10);
aa20:=ma(c,20);bb10:=atan((aa10/ref(aa10,1)-1)*100)*180/3.1416;
aa30:=ma(c,30);
三拾日乖离率:=(c-aa30)/aa30*100;
var11:=(aa20-aa30)>ref((aa20-aa30),1)
and aa20>ref(aa20,1) and aa30>ref(aa30,1);
var22:=(aa30-aa20)<ref((aa30-aa20),1) and aa20<ref(aa20,1) and
aa30<ref(aa30,1);
bb30:=atan((aa30/ref(aa30,1)-1)*100)*180/3.1416;
强势狙击:=filter(bb30>30 and bb10>45 and
cross(bb05,60),10);
加仓:=filter(count(cross(bb05,30),5)>=1 and
aa05>ref(aa05,1) and 三拾日乖离率>ref(三拾日乖离率,1) and
aa10>ref(aa10,1)
and 加速度5>ref(加速度5,1) and 速度5>ref(速度5,1) ,10) ;
清仓:=filter(count(cross(30,bb05),5)>=1 and (c>aa30 or o>aa30) and
aa05<ref(aa05,1) and 三拾日乖离率<ref(三拾日乖离率,1) and
aa10<ref(aa10,1),10);
drawicon(加仓 ,low*0.99,23);
drawicon(清仓 ,high*1.01,15);
drawicon(强势狙击 ,low*0.99,13);
typ := (high + low + close)/3;
cci1:=(typ-ma(typ,6))/(0.015*avedev(typ,6));
差值1:=abs(ref(cci1,1)-cci1),linethick0;
cci2:=(typ-ma(typ,10))/(0.015*avedev(typ,10));
差值2:=abs(ref(cci2,1)-cci2),linethick0;
cci3:=(typ-ma(typ,20))/(0.015*avedev(typ,20));
差值3:=abs(ref(cci3,1)-cci3),linethick0;
cci4:=(typ-ma(typ,30))/(0.015*avedev(typ,30));
差值4:=abs(ref(cci4,1)-cci4),linethick0;
cci5:=(typ-ma(typ,60))/(0.015*avedev(typ,60));
差值5:=abs(ref(cci5,1)-cci5),linethick0;
cci:=cci1+cci2+cci3+cci4+cci5;
tj1:= cci1>差值4;
立桩量:=filter(tj1,0);
tj2:=if(barslast(立桩量)=1 ,1,if(barslast(立桩量)=2 ,1,
if(barslast(立桩量)=3 ,1,0)));
成立1:=tj2;
条件成立1:=filter(成立1,5);
tj11:= cci1<-差值4 ;
立桩量2:=filter(tj11,0);
tj22:=if(barslast(立桩量2)=1 and close>ref(high,1),1,
if(barslast(立桩量2)=2 and close>ref(high,2),1,
if(barslast(立桩量2)=3 and close>ref(high,3),1,0)));
成立2:=tj22;
条件成立2:=filter(成立2,5);
tj111:=(abs(cci1)>cci and abs( 差值1)> abs(差值5))
or (vol=hhv(vol,10) and vol>2*ref(vol,1) and close>ar8);
立桩量3:=filter(tj111,5);
tj222:=if(barslast(立桩量3)=1 and close>ref(high,1),1,if(barslast(立桩量3)=2 and close>ref(high,2),1,if(barslast(立桩量3)=3 and close>ref(high,3),1,0)));
突破3:=tj222=1;
stickline(close and 下跌!= var6,ref(high,barslast(立桩量3)),
ref(high,barslast(立桩量3)),10,1),colorcyan;
stickline(close and 下跌!= var6,ref(low,barslast(立桩量3)),
ref(low,barslast(立桩量3)),10,1),coloryellow;
tj3:=if(barslast(立桩量3)=1 and close>ref(low,1),1,if(barslast(立桩量3)=2 and close>ref(low,2),1,if(barslast(立桩量3)=3 and close>ref(low,3),1,0)));
三天法则:=tj3=1;
成立:=三天法则 and 突破3;
条件成立:=filter(成立,5);
tj31:=(vol=hhv(vol,10) and vol>2*ref(vol,1) and close>ar8);
tj32:=filter(tj31,1);
if(条件成立 and 下跌!= var6 and aa30>=ref(aa30,1),h*1.03,drawnull),crossdot,linethick6,colorff33ff;
if(条件成立 and 下跌!= var6 and aa30>=ref(aa30,1),h*1.03,drawnull),pointdot,linethick4,color00ccff;
drawicon(条件成立1,ref(high,barslast(立桩量3)),12);
drawicon(条件成立2,ref(low,barslast(立桩量3)),11);
drawicon(cross(ar8,bb),bb,9);
drawicon(cross(ar5,中线),中线,6);
tt4:=(currbarscount=26+1);
drawtext(tt4,llv(l,20), '迷惑创于09.05.16'),linethick1,colorcyan;
{以下部分可以去掉}
m:=intpart(3*n/5);
e1:=ref(h,n)=hhv(h,2*n+1);
f1:=backset(e1,n+1);
g1:=filter(f1,n) and h=hhv(h,n+1);
drawicon(g1,h*1.01,2);
e2:=ref(h,m)=hhv(h,2*m+1);
f2:=backset(e2,m+1);
g2:=filter(f2,m) and h=hhv(h,m+1);
drawicon(g2,h*1.01,2);
ee1:=ref(l,n)=llv(l,2*n+1);
ff1:=backset(ee1,n+1);
gg1:=filter(ff1,n) and l=llv(l,n+1);
drawicon(gg1,l*0.987,1);
ee2:=ref(l,m)=llv(l,2*m+1);
ff2:=backset(ee2,m+1);
gg2:=filter(ff2,m) and l=llv(l,m+1);
drawicon(gg2,l*0.987,1);
上一指标公式:神奇线无未来买卖精准指标详解 通达信源码神奇
下一指标公式:顶底解盘-不错的主图指标详解 通达信顶底解盘
☉ 好公式网发布的指标公式主要用于软件技术面分析,仅供参考,勿用于实际操作,据此操作风险自负!
☉ 解压密码:www.goodgongshi.com 就是好公式网域名,希望大家看清楚,切勿输错。
☉ tnc和tni格式指标公式,仅可以用通达信软件引入使用,例如可以用通达信软件引入使用指标公式;
☉ tne格式指标公式,仅可以用通达信软件公式编辑器5.0版导入,高版本兼容低版本;
☉ fnc格式指标公式,可以用大智慧软件新一代高速行情分析系统股票软件使用,少部分可以用分析家软件引入使用;
☉ alg格式指标公式,仅仅可以用飞狐交易师软件引入使用;exp格式指标公式,仅可以用大智慧经典版软件引入使用;
☉ hxf格式指标公式,仅可以用同花顺软件引入使用。
☉ 如果您发现下载软件链接错误,请联系管理员报告错误。
☉ 好公式网欢迎各位网友帮忙宣传转发本站网址,有您的支持,我们会做得更好!
☉ 本文加权均线指标详解 通达信加权仅供学习研究。