通达信 怎样自动标志高低点价格

建业嗨起来 2024-06-17 13:45:06
最佳回答
这个是需要用到主图公式的,自动出来的只有页面显示的k线一个最高和一个最低。下面的公式自己去创建一个主图用的就可以显示波段的高低点价格了。a1:=ref(h,7)=hhv(h,2*7+1); b1:=filter(a1,7); c1:=backset(b1,7+1); d1:filter(c1,7),nodraw;{高点}a2:=ref(l,7)=llv(l,2*7+1); b2:=filter(a2,7); c2:=backset(b2,7+1); d2:filter(c2,7),nodraw;{低点}e1:=(ref(llv(l,2*7),1)+ref(hhv(h,2*7),1))/2; e2:=(h+l)/2;{高低点出现在同一k线上时可作取舍}h1:=(d1 and not(d2 and e1>=e2)) or **lastbar 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 **lastbar 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(**lastbar,barslast(hd)+1); s1:r1>ref(r1,1),nodraw; {前一高}t1:=backset(**lastbar,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),colormagenta,linethick1;压力2:=drawline(s3,h,s2,h,1),colorff8000; 压力3:=drawline(s4,h,s3,h,1),color0000ff;支撑1:=drawline(u2,l,u1,l,1),color8fbc8f,linethick1;支撑2:=drawline(u3,l,u2,l,1),color99cc32; 支撑3:=drawline(u4,l,u3,l,1),color00ff7f;{drawicon(s2,h*1.01,10);drawicon(s3,h*1.01,10);}drawnumber(s2,h*1.024,h),colorwhite;drawnumber(s1,h*1.024,h),colorwhite;drawnumber(s3,h*1.024,h),colorwhite;drawnumber(s4,h*1.024,h),colorwhite;drawnumber(u1,l*0.99,l),colorgray;drawnumber(u2,l*0.99,l),colorgray;drawnumber(u3,l*0.99,l),colorgray;drawicon(u1,l*0.99,11); 高一:drawline(s1,h,ref(s1,1),ref(h,1),1)colorred,dotline;高二:drawline(s2,h,ref(s2,1),ref(h,1),1)colormagenta,dotline;高三:=drawline(s3,h,ref(s3,1),ref(h,1),1)colorlired,dotline;低一:drawline(u1,l,ref(u1,1),ref(l,1),1)colorgreen,dotline;低二:drawline(u2,l,ref(u2,1),ref(l,1),1)colorliblue,dotline;低三:=drawline(u3,l,ref(u3,1),ref(l,1),1)colorlicyan,dotline; 20210311
汇率兑换计算器

类似问答
汇率兑换计算器

热门推荐
热门问答
最新问答
推荐问答
新手帮助
常见问题
房贷计算器-九子财经 | 备案号: 桂ICP备19010581号-1 商务联系 企鹅:2790-680461

特别声明:本网为公益网站,人人都可发布,所有内容为会员自行上传发布",本站不承担任何法律责任,如内容有该作者著作权或违规内容,请联系我们清空删除。