指标公式详细说明
好公式网(www.goodgongshi.com)告诉您:当前正要下载:波神八线公式 飞狐波神八线指标 源码
波神八线
input:最近天(30,1,360),k(1,1,2);
m5:ma(close,5),linethick0;
m10:ma(close,10),linethick0;
m20:ma(close,20),linethick0;
m30:ma(close,30),linethick0;
m60:ma(close,60),linethick0;
m120:ma(close,120),linethick0;
kdb1:=filter(backset(barscount(c)=sysparam(1) ,5),5);
kdb2:=filter(backset(barscount(c)=sysparam(1) ,10),10);
kdb3:=filter(backset(barscount(c)=sysparam(1) ,20),20);
kdb4:=filter(backset(barscount(c)=sysparam(1) ,30),30);
kdb5:=filter(backset(barscount(c)=sysparam(1) ,60),60);
kdb6:=filter(backset(barscount(c)=sysparam(1) ,120),120);
{以上公式寫法在找出均線扣抵之位置}
vertline(kdb1),colorcyan,pointdot;
vertline(kdb2),colorcyan,pointdot;
vertline(kdb3),colorcyan,pointdot;
vertline(kdb4),colorcyan,pointdot;
vertline(kdb5),colorcyan,pointdot;
vertline(kdb6),colorcyan,pointdot;
{以上公式部分在標記均線扣抵位置}
n:=if(sysparam(1)=datacount,最近天,0);
hh:=hhv(h,n);
ll:=llv(l,n);
vn:=n;
{last1:=datacount;}
if vn>datacount then
vn:=datacount+1;
for i=datacount downto datacount-vn+1 do begin
hh[i]:=hh[datacount];
ll[i]:=ll[datacount];
end;
kkh:=barslast(high=hh);
kkl:=barslast(low=ll);
n低日:=strtonum(numtostr(ref(barpos,kkl),0)),linethick;
n高日:=strtonum(numtostr(ref(barpos,kkh),0)),linethick;
多空:=if(n低日>n高日,2,1);
date1:=if(多空=1,n低日,n高日);{}
hh0:=if(ref(high,barslast(date1=barpos)+k-1)>ref(high,barslast(date1=barpos)),ref(high,barslast(date1=barpos)+k-1),ref(high,barslast(date1=barpos)));
hhh00:=ref(high,barslast(date1=barpos));
ll0:=ref(low,barslast(date1=barpos));
h1:=strtonum(numtostr(hh0,3)),pointdot;
hhh0:=strtonum(numtostr(hhh00,3)),pointdot;
l1:=strtonum(numtostr(ll0,3)),pointdot;
hh00:=ref(high,barslast(date1=barpos));
ll00:=if(ref(low,barslast(date1=barpos)+k-1)<ref(low,barslast(date1=barpos)),ref(low,barslast(date1=barpos)+k-1),ref(low,barslast(date1=barpos)));
h11:=strtonum(numtostr(hh00,3)),pointdot;
l11:=strtonum(numtostr(ll00,3)),pointdot;
nn:=sysparam(1);
if nn<1 or nn>datacount then exit;
x1:=sysparam(1)=barpos;
tz1:=if(ref(h,k-1)>h,ref(h,k-1),h);
tm1:=h;
tz2:=l;
zt1:=tz1[nn];
zm1:=tm1[nn];
zt2:=tz2[nn];
z1:=if(sysparam(1)=datacount,h1,zt1);
tm:=if(sysparam(1)=datacount,hhh0,zm1);
z2:=if(sysparam(1)=datacount,l1,zt2);
tz11:=h;
tz22:=if(ref(l,k-1)<l,ref(l,k-1),l);
zt11:=tz11[nn];
zt22:=tz22[nn];
z11:=if(sysparam(1)=datacount,h11,zt11);
z22:=if(sysparam(1)=datacount,l11,zt22);
partline(sysparam(1)=datacount,tm),,pointdot,linethick0,color999999;
partline(sysparam(1)=datacount,z2),,pointdot,linethick0,color999999;
xxx1:=x1 and l1<=ref(low,barslast(date1=barpos)+1);
xxxx1:=x1 and l<=ref(l,1) and l<ref(l,2) and l<refx(l,1);
xx1:=if(sysparam(1)=datacount,xxx1,xxxx1);
xxx2:=x1 and h11>=ref(high,barslast(date1=barpos)+1);
xxxx2:=x1 and h>=ref(h,1) and h>=ref(h,2) and h>refx(h,1);
xx2:=if(sysparam(1)=datacount,xxx2,xxxx2);
drawtext(xx1 ,z1+(z1-z2)*1.0,'--⑴----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'),colorff00ff,pxup15;
drawtext(xx1 ,z1+(z1-z2)*1.4,'--⑵----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'),colorff00ff,pxup15;
drawtext(xx1 ,z1+(z1-z2)*2.1,'--⑶----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'),colorff9963,pxup15;
drawtext(xx1 ,z1+(z1-z2)*2.7,'--⑷----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'),colorff00ff,pxup15;
drawtext(xx1 ,z1+(z1-z2)*3.1,'--⑸----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'),colorff00ff,pxup15;
drawtext(xx1 ,z1+(z1-z2)*3.7,'--⑹----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'),colorff9963,pxup15;
drawtext(xx1 ,z1+(z1-z2)*4.4,'--⑺----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'),colorff00ff,pxup15;
drawtext(xx1 ,z1+(z1-z2)*5.0,'--⑻----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'),colorff00ff,pxup15;
drawtext(xx1 ,z1+(z1-z2)*0.5,'--◇-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'),colorff9963,pxup15;
drawtext(xx1 ,z1+(z1-z2)*5.8,'--◇-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'),colorff9963,pxup15;
drawtext(xx2 ,z22-(z11-z22)*1.0,'--⑴-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'),colorff00ff,pxup15;
drawtext(xx2 ,z22-(z11-z22)*1.4,'--⑵----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'),colorff00ff,pxup15;
drawtext(xx2 ,z22-(z11-z22)*2.1,'--⑶---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'),colorff9963,pxup15;
drawtext(xx2 ,z22-(z11-z22)*2.7,'--⑷---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'),colorff00ff,pxup15;
drawtext(xx2 ,z22-(z11-z22)*3.1,'--⑸---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'),colorff00ff,pxup15;
drawtext(xx2 ,z22-(z11-z22)*3.7,'--⑹---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'),colorff9963,pxup15;
drawtext(xx2 ,z22-(z11-z22)*4.4,'--⑺---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'),colorff00ff,pxup15;
drawtext(xx2 ,z22-(z11-z22)*5.0,'--⑻---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'),colorff00ff,pxup15;
drawtext(xx2 ,z22-(z11-z22)*0.5,'--◇----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'),colorff9963,pxup15;
drawtext(xx2 ,z22-(z11-z22)*5.8,'--◇----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'),colorff9963,pxup15;
drawtext(sysparam(2)=barpos,h1,'上升八线:㈠'+numtostr(z1+(z1-z2)*1,2)+'㈡'+numtostr(z1+(z1-z2)*1.4,2)+'㈢'+numtostr(z1+(z1-z2)*2.1,2)+'㈣'+numtostr(z1+(z1-z2)*2.7,2)+'㈤'+numtostr(z1+(z1-z2)*3.1,2)+'㈥'+numtostr(z1+(z1-z2)*3.7,2)+'㈦'+numtostr(z1+(z1-z2)*4.4,2)+'㈧'+numtostr(z1+(z1-z2)*5,2)),colorffaaaa,align4;
drawtext(sysparam(2)=barpos,l1,'下降八线:㈠'+numtostr(z22-(z11-z22)*1,2)+'㈡'+numtostr(z22-(z11-z22)*1.4,2)+'㈢'+numtostr(z22-(z11-z22)*2.1,2)+'㈣'+numtostr(z22-(z11-z22)*2.7,2)+'㈤'+numtostr(z22-(z11-z22)*3.1,2)+'㈥'+numtostr(z22-(z11-z22)*3.7,2)+'㈦'+numtostr(z22-(z11-z22)*4.4,2)+'㈧'+numtostr(z22-(z11-z22)*5,2)),colorffaaaa,align5;
>>>使用本站搜索工具可以找到更多“波神八线公式 飞狐波神八线指标 源码”