您现在的位置:好股网 >> 股票公式 >> 飞狐股票公式 >> 一键转帖:知无不言(cwy)-日线叠加 任意周期K线『附本人小小修改』

知无不言(cwy)-日线叠加 任意周期K线『附本人小小修改』


指标功能:[B]国产软件[/B]
指标类型:简体中文
所需积分:0
推荐星级:
授权方式:共享版
公式大小:0 Bytes
更新时间:2013-02-10 11:13:00
公式简介:

知无不言老师的原版公式:
INPUT:N(9,1,1000);
zq:=mod(barpos,n)=1;ts:=barslast(zq);s:=if(ts>ref(ts,1),1,0);
zqdw:=backset(ts=0,ts+2);
z:=cross(backset(ts=0,ref(ts,1)/2+2),0.5);
zjts:=round(ts[datacount]/2);
zjz:=cross(backset(islastbar,zjts),0.5);
h1:=hhv(h,ts+1);l1:=llv(l,ts+1);o1:=(ts=0)*o;
c1:=if(zqdw=1 and ts>0,c,if(barstatus=2,c,0));
ft:=ts;rt:=ref(ts,1);x:=0*c;
for i= datacount downto 2 do begin
if ft>rt then
x[i-1]:=x+s;
end
o2:ref(o1,ts)LINETHICK0;c2:refx(c1,x)LINETHICK0;h2:refx(h1,x)LINETHICK0;l2:refx(l1,x)LINETHICK0;
k:=c2>o2 or c2=o2 and c2>ref(c2,ts);tj1:=z or zjz;
tj:=ts=0 or barstatus=2 or zqdw=1and ts>ref(ts,1);
partline(ts and k,o2)COLORRED;
partline(ts and k,c2)COLORRED;
partline(ts and not(k),o2)COLORCYAN;
partline(ts and not(k),c2)COLORCYAN;
STICKLINE(tj1 and k,h2,c2,0.1,1)COLORRED;
STICKLINE(tj1 and k,l2,o2,0.1,1)COLORRED;
STICKLINE(tj1 and not(k),h2,o2,0.1,1)COLORCYAN;
STICKLINE(tj1 and not(k),l2,c2,0.1,1)COLORCYAN;
STICKLINE(tj and k,o2,c2,0.1,1)COLORRED;
STICKLINE(tj and not(k),o2,c2,0.1,1)COLORCYAN;
STICKLINE(barstatus=2 and ts<1and k,h2,l2,0.1,1)COLORRED;
STICKLINE(barstatus=2 and ts<1and k,o2,c2,8,1)COLORRED;
STICKLINE(barstatus=2 and ts<1and not(k),h2,l2,0.1,1)COLORCYAN;
STICKLINE(barstatus=2 and ts<1and not(k),o2,c2,8,1)COLORCYAN;




{自由周期K线(调整指标参数)飞狐版-原作 知无不言(cwy)-调整 理想 刘松何柏—(加了个参数 M 调整大于1的数可以设定多周期K线的画出的起始点,默认1不调为上市首日)-注:原公式参数 N 当调整到小于4的值时,画出的K线不带上下影线-此处未修正}
INPUT:N(9,1,1000),M(1,1,100);
BAR:=(BARPOS-M+1);
zq:=mod(bar,n)=1;ts:=barslast(zq);s:=if(ts>ref(ts,1),1,0);
zqdw:=backset(ts=0,ts+2);
z:=cross(backset(ts=0,ref(ts,1)/2+2),0.5);
zjts:=round(ts[datacount]/2);
zjz:=cross(backset(islastbar,zjts),0.5);
h1:=hhv(h,ts+1);l1:=llv(l,ts+1);o1:=(ts=0)*o;
c1:=if(zqdw=1 and ts>0,c,if(barstatus=2,c,0));
ft:=ts;rt:=ref(ts,1);x:=0*c;
for i= datacount downto M+1 do begin
if ft[i]>rt[i] then
x[i-1]:=x[i]+s[i];
end
o2:ref(o1,ts)LINETHICK0;c2:refx(c1,x)LINETHICK0;h2:refx(h1,x)LINETHICK0;l2:refx(l1,x)LINETHICK0;
k:=c2>o2 or c2=o2 and c2>ref(c2,ts);tj1:=z or zjz;
tj:=ts=0 or barstatus=2 or zqdw=1and ts>ref(ts,1);
partline(ts and k,o2)COLORRED;
partline(ts and k,c2)COLORRED;
partline(ts and not(k),o2)COLORCYAN;
partline(ts and not(k),c2)COLORCYAN;
STICKLINE(tj1 and k,h2,c2,0.1,1)COLORRED;
STICKLINE(tj1 and k,l2,o2,0.1,1)COLORRED;
STICKLINE(tj1 and not(k),h2,o2,0.1,1)COLORCYAN;
STICKLINE(tj1 and not(k),l2,c2,0.1,1)COLORCYAN;
STICKLINE(tj and k,o2,c2,0.1,1)COLORRED;
STICKLINE(tj and not(k),o2,c2,0.1,1)COLORCYAN;
STICKLINE(barstatus=2 and ts<1and k,h2,l2,0.1,1)COLORRED;
STICKLINE(barstatus=2 and ts<1and k,o2,c2,8,1)COLORRED;
STICKLINE(barstatus=2 and ts<1and not(k),h2,l2,0.1,1)COLORCYAN;
STICKLINE(barstatus=2 and ts<1and not(k),o2,c2,8,1)COLORCYAN;


 


[url=http://www.goodgupiao.com/gupiaogongshi/25796.html][B]知无不言(cwy)-日线叠加 任意周期K线『附本人小小修改』[/B][/url]