~Camille~
2024-05-26 00:57:04
最佳回答
通达信软件自划线指标主图源码(不需要参数):highn:=10;lown:=10;highd**play:=0;lowd**play:=0;zgd**play:=0;mad**play:=0;aa:=ref(h,highn)=hhv(h,2*highn+1);qy:=backset(aa,highn+1);cc:=filter(qy,highn) and h=hhv(h,highn+1);drawicon(cc,h*1.02,2);ddd:=barslast(cc);gdts:=if(cc,currbarscount,0);dingbu:=if(ddd,ref(h,ddd),h);dingbuts:=if(ddd,ref(gdts,ddd),gdts);dingbu1:=ref(dingbu,ddd+1);gdcs1:=const(dingbuts);dingbuts1:=ref(dingbuts,ddd+1);gdcs2:=const(dingbuts1);dingbu2:=ref(dingbu1,ddd+1);mm:=if(currbarscount>gdcs2,0,1);高点压力:drawline(currbarscount=gdcs2,h,currbarscount=gdcs1,h,1) colorgreen,linethick2;drawline(currbarscount=gdcs2,h,**lastbar,ref(h,gdcs2-1),1),color0055ff,pointdot;drawline(currbarscount=gdcs1,h,**lastbar,ref(h,gdcs1-1),1),coloryellow,pointdot;aa1:=ref(l,lown)=llv(l,2*lown+1);qy1:=backset(aa1,lown+1);cc1:=filter(qy1,lown) and l=llv(l,lown+1);drawicon(cc1,l*0.98,1);dd1:=barslast(cc1);ddts:=if(cc1,currbarscount,0);ydb:=if(dd1,ref(l,dd1),l);ddts1:=if(dd1,ref(ddts,dd1),ddts);ddcs1:=const(ddts1);zdb:=ref(ydb,dd1+1);ddts2:=ref(ddts1,dd1+1);ddcs2:=const(ddts2);低点支撑:drawline(currbarscount=ddcs2,l,currbarscount=ddcs1,l,1) colorred,linethick2;zgstar:=(高点压力+低点支撑)/2;zgend:=const((高点压力+低点支撑)/2);starday:=if(ddcs2=e2)) or barstatus=2 or barscount(c)=1;l1:=(d2 and not(d1 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);l2:=ld or barstatus=2 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);r1:=backset(barstatus=2,barslast(hd)+1); s1:=r1>ref(r1,1);t1:=backset(barstatus=2,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);短期压力:drawline(s2,h,s1,h,1),colorred;短期支撑:drawline(u2,l,u1,l,1),colorgreen;中期压力:drawline(s3,h,s2,h,1),coloryellow;中期支撑:drawline(u3,l,u2,l,0),colorgreen;长期压力:drawline(s4,h,s3,h,1),colorwhite;长期支撑:drawline(u4,l,u3,l,0),colorgreen;drawicon(s1,h*1.01,10);drawicon(s2,h*1.01,10);drawicon(s3,h*1.01,10);drawicon(s4,h*1.01,10);drawicon(u1,l*0.99,9);drawicon(u2,l*0.99,9);drawicon(u3,l*0.99,9);drawicon(u4,l*0.99,9);上面两个指标都是有未来程序的,用的时候要注意,信号不完全可信!,切记切记! 20210311