好公式网用指标公式为投资注入科技力量!
您的位置:好公式网飞狐公式三角划线自动划线公式 飞狐划线指标 源码

三角划线自动划线公式 飞狐划线指标 源码

  • 指标公式类型:飞狐公式
  • 公式推荐星级:
  • 指标公式安全:已通过5款杀毒软件查杀,请放心下载!
  • 公式更新时间:2018-10-06 14:37:29
  • 指标公式标签:划线
  • 公式运行环境: WinXP/Win7/Win8/Win10/Win All
  • 指标公式语言:用简体中文编写

指标公式详细说明

好公式网(www.goodgongshi.com)告诉您:当前正要下载:三角划线自动划线公式 飞狐划线指标 源码

n参数10

v1:=islastbar;
v2:=ref(h,n)=hhv(h,2*n+1);
v3:=filter(v2,n);
v4:=backset(v3,n+1);
v5:=filter(v4,n);
v6:=v5 or v1;
v7:=ref(l,n)=llv(l,2*n+1);
v8:=filter(v7,n);
v9:=backset(v8,n+1);
va:=filter(v9,n);
vb:=va and not(v5);
vc:=backset(v6,ref(barslast(vb),1)+1);
vd:=vc>ref(vc,1);
ve:=backset(vd,2);
vf:=ve>ref(ve,1);
v10:=backset(vf and count(v6,ref(barslast(vb),1)+2)=0,ref(barslast(vb),1)+2);
v11:=v10>ref(v10,1);
v12:=backset(v11 and count(v6,ref(barslast(vb),1)+2)=0,ref(barslast(vb),1)+2);
v13:=v12>ref(v12,1);
v14:=if(v6,count(vb,ref(barslast(v6),1)+1),0);
v15:=if(v14=1 and v6,barslast(vf),0);
v16:=if(v6 and ref(l,barslast(vf))>=ref(l,barslast(v11)),barslast(v11),barslast(vf));
v17:=if(v14=2 and v6,v16,0);
v18:=if(v14>=3 and v6,if(v6 and ref(l,v16)>=ref(l,barslast(v13)),barslast(v13),v16),0);
v19:=v15+v17+v18;
v1a:=backset(v6,v19);
v1b:=v1a>ref(v1a,1);
v1c:=backset(v1b,2);
v1d:=v1c>ref(v1c,1);
v1e:=v1d or v1;
v1f:=backset(v1e,ref(barslast(v6),1)+1);
v20:=v1f>ref(v1f,1);
v21:=backset(v20,2);
v22:=v21>ref(v21,1);
v23:=backset(v22 and count(v1e,ref(barslast(v6),1)+2)=0,ref(barslast(v6),1)+2);
v24:=v23>ref(v23,1);
v25:=backset(v24 and count(v1e,ref(barslast(v6),1)+2)=0,ref(barslast(v6),1)+2);
v26:=v25>ref(v25,1);
v27:=if(v1e,count(v5,ref(barslast(v1e),1)+1),0);
v28:=if(v27=1 and v1e,barslast(v22),0);
v29:=if(v1e and ref(h,barslast(v22))<=ref(h,barslast(v24)),barslast(v24),barslast(v22));
v2a:=if(v27=2 and v1e,v29,0);
v2b:=if(v27>=3 and v1e,if(v1e and ref(h,v29)<=ref(h,barslast(v26)),barslast(v26),v29),0);
v2c:=v28+v2a+v2b;
v2d:=backset(v1e,v2c);
v2e:=v2d>ref(v2d,1);
v2f:=backset(v2e,2);
v30:=v2f>ref(v2f,1);
drawline(v1d,l,v30,h,0),linethick1;
drawline(v30,h,v1d,l,0),linethick1;
v31:=backset(v1,barslast(v1d)+1);
v32:=v31>ref(v31,1);
v33:=backset(v1,barslast(v30)+1);
v34:=v33>ref(v33,1);
v35:=if(barslast(v32)<barslast(v34),v32,v34);
v36:=if(barslast(v32)<barslast(v34),l,h);
drawline(v35,v36,v1,c,0),linethick1;
v37:=backset(v1,barslast(v1d)+1);
v38:=v37>ref(v37,1);
v39:=backset(v38,ref(barslast(v1d),1)+2);
v3a:=v39>ref(v39,1);
drawline(v3a,l,v38,l,1),linethick1,coloryellow,pointdot;
v3b:=backset(v1,barslast(v30)+1);
v3c:=v3b>ref(v3b,1);
v3d:=backset(v3c,ref(barslast(v30),1)+2);
v3e:=v3d>ref(v3d,1);
drawline(v3e,h,v3c,h,1),linethick1,coloryellow,pointdot;

xx1: ref(l,barslast(v38)),colorccff99,linethick2;
前二低: ref(l,barslast(v3a)),colormagenta,linethick2;
yy1: ref(h,barslast(v3c)),colorccff99,linethick2;
前二高: ref(h,barslast(v3e)),colormagenta,linethick2;
drawnumber(islastbar,yy1,yy1,2);
drawnumber(islastbar,xx1,xx1,2);
drawnumber(islastbar,前二低,前二低,2);
drawnumber(islastbar,前二高,前二高,2);

j:=ref(h,n)=hhv(h,2*n+1);
ja:=filter(j,n);
bb:=backset(ja,n+1);
j1:=filter(bb,n);
j:=j1 or islastbar;
j2:=ref(l,n)=llv(l,2*n+1);
ja2:=filter(j2,n);
bb2:=backset(ja2,n+1);
j22:=filter(bb2,n);
j2:=j22 and not(j1);
ea:=backset(j,ref(barslast(j2),1)+1);
eb:=ea>ref(ea,1); jf:=backset(eb,2);
jj1:=jf>ref(jf,1);
jf2:=backset(jj1 and count(j,ref(barslast(j2),1)+2)=0,ref(barslast(j2),1)+2);
jj2:=jf2>ref(jf2,1);
jf3:=backset(jj2 and count(j,ref(barslast(j2),1)+2)=0,ref(barslast(j2),1)+2);
jj3:=jf3>ref(jf3,1);
js:=if(j,count(j2,ref(barslast(j),1)+1),0);
g1:=if(js=1 and j,barslast(jj1),0);
ga:=if(j and ref(l,barslast(jj1))>=ref(l,barslast(jj2)),barslast(jj2),barslast(jj1));
g2:=if(js=2 and j,ga,0);
g3:=if(js>=3 and j,if(j and ref(l,ga)>=ref(l,barslast(jj3)),barslast(jj3),ga),0);
gg:=g1+g2+g3;
ja:=backset(j,gg); jb:=ja>ref(ja,1); jj:=backset(jb,2);
ld:=jj>ref(jj,1);
ld1:=ld or islastbar;
hea:=backset(ld1,ref(barslast(j),1)+1);
heb:=hea>ref(hea,1); hjf:=backset(heb,2);
hjj1:=hjf>ref(hjf,1);
hjf2:=backset(hjj1 and count(ld1,ref(barslast(j),1)+2)=0,ref(barslast(j),1)+2);
hjj2:=hjf2>ref(hjf2,1);
hjf3:=backset(hjj2 and count(ld1,ref(barslast(j),1)+2)=0,ref(barslast(j),1)+2);
hjj3:=hjf3>ref(hjf3,1);
hjs:=if(ld1,count(j1,ref(barslast(ld1),1)+1),0);
hg1:=if(hjs=1 and ld1,barslast(hjj1),0);
hga:=if(ld1 and ref(h,barslast(hjj1))<=ref(h,barslast(hjj2)),barslast(hjj2),barslast(hjj1));
hg2:=if(hjs=2 and ld1,hga,0);
hg3:=if(hjs>=3 and ld1,if(ld1 and ref(h,hga)<=ref(h,barslast(hjj3)),barslast(hjj3),hga),0);
hgg:=hg1+hg2+hg3;
hja:=backset(ld1,hgg);
hjb:=hja>ref(hja,1);
hjj:=backset(hjb,2);
hd:=hjj>ref(hjj,1),linethick2;
uu:=backset(islastbar,barslast(ld)+1);
vv:=10*(uu>ref(uu,1));
uu2:=backset(islastbar,barslast(hd)+1);
vv2:=20*(uu2>ref(uu2,1));
{-------------------------------------------------------------------------------------}
底1:=ref(l,barslast(ld)),colorred,linethick1;
頂1:=ref(h,barslast(hd)),colorgreen,linethick1;
stickline(hd ,頂1,底1,0,0),color660099,linethick1;{}
drawline(ld,l,hd,h,0),color660099,linethick1;{斜}
drawline(ld,l,hd,底1,0),color660099,linethick1;{?}
stickline(ld,頂1,底1,0,0),color666666,linethick1;{}
drawline(hd,h,ld,l,0),color666666,linethick1;{斜}
drawline(hd,h,ld,頂1,0),color666666,linethick1;{?}
{-------------------------------------------------------------------------------------}

底:ref(l,barslast(vv)),colorred,linethick2;
頂:ref(h,barslast(vv2)),colorgreen,linethick2;

{下迭三角形:藍色三角形畫完介入}
stickline(vv,頂,底,0,0),colorff6633,linethick3;{}
drawline(vv2,h,vv,l,0),colorff6633,linethick3;{斜}
drawline(vv2,h,vv,頂,0),colorff6633,linethick3;{?}

{drawline(c>0,h,vv,l,0),colorcyan,linethick2;}{斜}
{drawline(c>1,h,vv,頂,0),colorcyan,linethick2;}{?}
{上漲三角形:紅色三角形畫完出局}
stickline(vv2 ,頂,底,0,0),colorred,linethick3;{??}
drawline(vv,l,vv2,h,0),colorred,linethick3;{斜}
drawline(vv,l,vv2,底,0),colorred,linethick3;{?}

{--------------------------------------------------------------------------------------------}
hat:=hhv(h,20);
hbt:=llv(l,20);
hht:=h;
llt:=l;
xat:=hat[datacount];
xbt:=hbt[datacount];
hbc[1]:=0;
nat:=hbc[1];
nbt:=hbc[1];
hnat:=hbc[1];
hnbt:=hbc[1];
cat:=hbc[1];
cbt:=hbc[1];
hct:=c;
fori=datacount downto datacount-200do
begin
if hat=xat then nat:=nat+1;
if hat=xatand nat=1 then cat:=i;
if hat=xatand nat=1 then hnat:=hat;

if hbt=xbt then nbt:=nbt+1;
if hbt=xbt and nbt=1 then cbt:=i;
if hbt=xbt and nbt=1 then hnbt:=hbt;
end;

hac[1]:=0;
atta:=hac[1];
attb:=hac[1];
atth1:=hac[1];
atth2:=hac[1];
atthi1:=hac[1];
atthi2:=hac[1];
attl1:=hac[1];
attl2:=hac[1];
attli1:=hac[1];
attli2:=hac[1];
hh:=h;
ll:=l;
{--------------------------------------------------------------------------------------------}
for i=datacount downtodatacount-300do
begin
ifhd>0 then atta:=atta+1;

if hd>0 and atta=1 thenatth1:=hh;
if hd>0 and atta=1 thenatthi1:=i;
if hd>0 and atta=2 thenatth2:=hh;
if hd>0 and atta=2 thenatthi2:=i;
if ld>0 then attb:=attb+1;
if ld>0 and attb=1 thenattl1:=ll;
if ld>0 and attb=1 thenattli1:=i;
if ld>0 and attb=2 thenattl2:=ll;
if ld>0 and attb=2 thenattli2:=i;
end;

{------------------------------------------------------------------------------}
nnn1:=70;
nnn:=70;
nnn2:=200;
nnn3:=datacount-1;

{hh:=hhv(h,nnn1);}
{ll:=llv(l,nnn1);}
dd3:=c;
dd4:=c;
dd5:=c;
ddt:=c;
ldd3:=c;
ldd4:=c;
ldd5:=c;
lddt:=c;
hh1:=atth1;
hh2:=atth2;
ll1:=attl1;
ll2:=attl2;

aa:=h;
xbb:=l;
cc:=c;
caa1:=atthi1,linethick1;
// caa1,linethick7;
caa2:=atthi2;
cbb1:=attli1;
cbb2:=attli2;
hnaa1:=atth1;
hnaa2:=atth2;
hnbb1:=attl1;
hnbb2:=attl2;
// hnbb2,linethick5;
// hnaa2,linethick5;

hnaat:=hnat;
hnbbt:=hnbt;
caat:=cat;
cbbt:=cbt;

<%
vh1=ffl.vardata("hh1")
vh2=ffl.vardata("hh2")
vl1=ffl.vardata("ll1")
vl2=ffl.vardata("ll2")
vn=ffl.vardata("nnn2")
vdd3=ffl.vardata("dd3")
vdd4=ffl.vardata("dd4")
vdd5=ffl.vardata("dd5")
vddt=ffl.vardata("ddt")
vldd3=ffl.vardata("ldd3")
vldd4=ffl.vardata("ldd4")
vldd5=ffl.vardata("ldd5")
vlddt=ffl.vardata("lddt")
vbb=ffl.vardata("xbb")
vaa=ffl.vardata("aa")
vcaa1=ffl.vardata("caa1")
vcaa2=ffl.vardata("caa2")
vcaat=ffl.vardata("caat")
vcbb1=ffl.vardata("cbb1")
vcbb2=ffl.vardata("cbb2")
vcbbt=ffl.vardata("cbbt")
vhnaa1=ffl.vardata("hnaa1")
vhnaa2=ffl.vardata("hnaa2")
vhnaat=ffl.vardata("hnaat")
vhnbb1=ffl.vardata("hnbb1")
vhnbb2=ffl.vardata("hnbb2")
vhnbbt=ffl.vardata("hnbbt")
last=ffl.vardata("nnn3")

dtt4=last-vn+1
bbtt4=0
aatt4=0
if vhnbb2<vhnbb1 then
bbtt4=vhnbb2
elsebbtt4=vhnbb1
end if
if vhnaa2<vhnaa1 then
aatt4=vhnaa1
elseaatt4=vhnaa2
end if

vcaat1=vcaa1
vcaat2=vcaa2
vcbbt1=vcbb1
vcbbt2=vcbb2

for i=last-vn+1 to last
if vcaat1<vcbbt1 then
vdd3(i-(last-vcaat2+1))=vhnaa2+(i-(last-vn+1))*(vhnbb2-vhnaa2)/abs(vcbbt2-vcaat2)
vdd4(i-(last-vcaat2+1))=vhnaa2+(i-(last-vn+1))*(vhnaa1-vhnaa2)/abs(vcaat1-vcaat2)
vdd5(i-(last-vcaat2+1))=vhnaa2+(i-(last-vn+1))*((vhnbb2+vhnaa1)/2-vhnaa2)/(int((vcbbt2+vcaat1)/2)-vcaat2)
else
vdd3(i-(last-vcaat2+1))=vhnaa2+(i-(last-vn+1))*(vhnbb1-vhnaa2)/abs(vcbbt1-vcaat2)
vdd4(i-(last-vcaat2+1))=vhnaa2+(i-(last-vn+1))*(vhnaa1-vhnaa2)/abs(vcaat1-vcaat2)
vdd5(i-(last-vcaat2+1))=vhnaa2+(i-(last-vn+1))*((vhnbb1+vhnaa1)/2-vhnaa2)/(int((vcbbt1+vcaat1)/2)-vcaat2)
end if
ifvdd5(i-(last-vcaat2+1))<=bbtt4*0.9then vdd5(i-(last-vcaat2+1))=bbtt4*0.9

if vcaat1<vcbbt1 then
vldd3(i-(last-vcbbt2+1))=vhnbb2+(i-(last-vn+1))*(vhnaa1-vhnbb2)/abs(vcaat1-vcbbt2)
vldd4(i-(last-vcbbt2+1))=vhnbb2+(i-(last-vn+1))*(vhnbb1-vhnbb2)/abs(vcbbt1-vcbbt2)
vldd5(i-(last-vcbbt2+1))=vhnbb2+(i-(last-vn+1))*((vhnaa1+vhnbb1)/2-vhnbb2)/(int((vcaat1+vcbbt1)/2)-vcbbt2)
else
vldd3(i-(last-vcbbt2+1))=vhnbb2+(i-(last-vn+1))*(vhnaa2-vhnbb2)/abs(vcaat2-vcbbt2)
vldd4(i-(last-vcbbt2+1))=vhnbb2+(i-(last-vn+1))*(vhnbb1-vhnbb2)/abs(vcbbt1-vcbbt2)
vldd5(i-(last-vcbbt2+1))=vhnbb2+(i-(last-vn+1))*((vhnaa2+vhnbb1)/2-vhnbb2)/(int((vcaat2+vcbbt1)/2)-vcbbt2)
end if
if vldd5(i-(last-vcbbt2+1))>aatt4*1.35 thenvldd5(i-(last-vcbbt2+1))=aatt4*1.35

if vcbbt1>vcaat1 then
vddt(i-(last-vcaat1+1))=vhnaa1+(i-(last-vn+1))*((vhnbb1+vhnaat)/2-vhnaa1)/(int((vcbbt1+vcaat)/2)-vcaat1)
elsevddt(i-(last-vcaat1+1))=vhnaa1
end if
if vddt(i-(last-vcaat1+1))<bbtt4*0.9 then vddt(i-(last-vcaat1+1))=bbtt4*0.9

if vcbbt1<vcaat1then
vlddt(i-(last-vcbbt1+1))=vhnbb1+(i-(last-vn+1))*((vhnaa1+vhnbbt)/2-vhnbb1)/(int((vcaat1+vcbbt)/2)-vcbbt1)
elsevlddt(i-(last-vcbbt1+1))=vhnbb1
end if
ifvlddt(i-(last-vcbbt1+1))>aatt4*1.35 thenvlddt(i-(last-vcbbt1+1))=aatt4*1.35

next

ffl.vardata("dd3")=vdd3
ffl.vardata("dd4")=vdd4
ffl.vardata("dd5")=vdd5
ffl.vardata("ddt")=vddt
ffl.vardata("ldd3")=vldd3
ffl.vardata("ldd4")=vldd4
ffl.vardata("ldd5")=vldd5
ffl.vardata("lddt")=vlddt
ffl.varstartindex("hh1")=last-vn-(last-vcaat2+1)+1
ffl.varstartindex("hh2")=last-vn-(last-vcaat2+1)+1
ffl.varstartindex("ll1")=last-vn-(last-vcaat2+1)+1
ffl.varstartindex("ll2")=last-vn-(last-vcaat2+1)+1
ffl.varstartindex("dd3")=last-vn-(last-vcaat2+1)+1
ffl.varstartindex("dd4")=last-vn-(last-vcaat2+1)+1
ffl.varstartindex("dd5")=last-vn-(last-vcaat2+1)+1

ffl.varstartindex("ddt")=last-vn-(last-vcaat1+1)+1
ffl.varstartindex("ldd3")=last-vn-(last-vcbbt2+1)+1
ffl.varstartindex("ldd4")=last-vn-(last-vcbbt2+1)+1
ffl.varstartindex("ldd5")=last-vn-(last-vcbbt2+1)+1
ffl.varstartindex("lddt")=last-vn-(last-vcbbt1+1)+1
%>

// partline(c>0 and barscount(c)<datacount-(datacount-caa2) anddd3>sysparam(5)*0.9,dd3),linethick1,shift199,color007700;
// partline(c>0 and barscount(c)<datacount-(datacount-caa2),dd4),linethick1,shift199,coloryellow;
partline(c>0 and barscount(c)<datacount-(datacount-caa2) and(dd5>sysparam(5)*0.94 and dd5<sysparam(4)*1.06),dd5),linethick2,pointdot,shift199,color007700;
drawnumber(barscount(c)+199=datacount and(dd5>sysparam(5)*0.94 and dd5<sysparam(4)*1.06),dd5,dd5,2),color007700,shift200;
stickline(barscount(c)+199=datacount and(dd5>sysparam(5)*0.94 and dd5<sysparam(4)*1.06),dd5,dd5+dd5*0.0001,60,0),color007700,shift199;

partline(c>0 and barscount(c)<datacount-(datacount-caa1) andddt>sysparam(5)*0.975,ddt),linethick4,pointdot,shift199,color007700;
drawnumber(barscount(c)+199=datacount,ddt,ddt,2),color007700,shift200;
stickline(barscount(c)+199=datacount,ddt,ddt+ddt*0.0001,60,0),color007700,shift199;

{partline(c>0 and barscount(c)<datacount-(datacount-cbb2)+30 andldd3<sysparam(4)*2.07,ldd3),linethick1,shift199,colorcc3366;}
{partline(c>0 and barscount(c)<datacount-(datacount-cbb2),ldd4),linethick1,shift199,colorcc3366;}
partline(c>0 and barscount(c)<datacount-(datacount-cbb2) andldd5<sysparam(4)*1.06,ldd5),linethick2,pointdot,shift199,colorcc3366;
drawnumber(barscount(c)+199=datacount,ldd5,ldd5,2),colorcc3366,shift200;
stickline(barscount(c)+199=datacount,ldd5,ldd5+ldd5*0.0001,60,0),colorcc3366,shift199;

partline(c>0 and barscount(c)<datacount-(datacount-cbb1) andlddt<sysparam(4)*1.06,lddt),linethick4,pointdot,shift199,colorcc3366;
drawnumber(barscount(c)+199=datacount,lddt,lddt,2),colorcc3366,shift200;
stickline(barscount(c)+199=datacount,lddt,lddt+lddt*0.0001,60,0),colorcc3366,shift199;

ac:=c;
ah:=h;
al:=l;
ao:=o;

stickline(ac>=ao,ah,ac,1,0),color008899;
stickline(ac>=ao,ah,ac,0,0),color77ffee;
stickline(ac>=ao,ao,al,1,0),color008899;
stickline(ac>=ao,ao,al,0,0),color77ffee;

stickline(ac>ao,ac,ao,8,0),color008899;
stickline(ac>ao,ac,ao,7,0),color1199aa;
stickline(ac>ao,ac,ao,6,0),color22aabb;
stickline(ac>ao,ac,ao,5,0),color33bbcc;
stickline(ac>ao,ac,ao,4,0),color44ccdd;
stickline(ac>ao,ac,ao,3,0),color55ddee;
stickline(ac>ao,ac,ao,2,0),color66eeee;
stickline(ac>ao,ac,ao,1,0),color77ffee;

stickline(ac<=ao,ah,ac,1,0),colorff8800;
stickline(ac<=ao,ah,ac,0,0),colorffff33;
stickline(ac<=ao,ao,al,1,0),colorff8800;
stickline(ac<=ao,ao,al,0,0),colorffff33;

stickline(ac<=ao,ac,ao,8,0),colorff8800;
stickline(ac<=ao,ac,ao,7,0),colorff9900;
stickline(ac<=ao,ac,ao,6,0),colorffaa11;
stickline(ac<=ao,ac,ao,5,0),colorffbb11;
stickline(ac<=ao,ac,ao,4,0),colorffcc22;
stickline(ac<=ao,ac,ao,3,0),colorffdd22;
stickline(ac<=ao,ac,ao,2,0),colorffee33;
stickline(ac<=ao,ac,ao,1,0),colorffff33;


三角划线(自动划线)源码

  >>>使用本站搜索工具可以找到更多三角划线自动划线公式 飞狐划线指标 源码

指标公式下载地址

点这下载软件
好公式网提供全网最全的指标公式软件,感谢您的支持!鼠标双击图片可看大图!
下载请点击右侧“立即下载”,如只有源码,请点击本页面右侧的导入方法按图导入!
本站指标基于网友分享,仅供研究自学,勿作他用,本站对下载使用不承担任何责任!

指标公式下载注意

    ☉ 好公式网发布的指标公式主要用于软件技术面分析,仅供参考,勿用于实际操作,据此操作风险自负!

    ☉ 解压密码:www.goodgongshi.com 就是好公式网域名,希望大家看清楚,切勿输错。

    ☉ tnc和tni格式指标公式,仅可以用通达信软件引入使用,例如可以用通达信软件引入使用指标公式;

    ☉ tne格式指标公式,仅可以用通达信软件公式编辑器5.0版导入,高版本兼容低版本;

    ☉ fnc格式指标公式,可以用大智慧软件新一代高速行情分析系统股票软件使用,少部分可以用分析家软件引入使用;

    ☉ alg格式指标公式,仅仅可以用飞狐交易师软件引入使用;exp格式指标公式,仅可以用大智慧经典版软件引入使用;

    ☉ hxf格式指标公式,仅可以用同花顺软件引入使用。

    ☉ 如果您发现下载软件链接错误,请联系管理员报告错误。

    ☉ 好公式网欢迎各位网友帮忙宣传转发本站网址,有您的支持,我们会做得更好!

    ☉ 本文三角划线自动划线公式 飞狐划线指标 源码仅供学习研究。

猜你喜欢

学了又学