查看完整版本: 自由周期K线

cwy 2005-8-2 19:59

自由周期K线

自由周期K线(调整指标参数)
[code]
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[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;
[/code]

[color=Teal][align=right] 本贴由 cwy 于 2005-8-2 22:23 最后编辑 [/align][/color]

股市骑兵00 2005-8-2 20:18

谢谢  cwy  朋友!:clap:

joneslee 2005-8-2 20:55

谢谢楼主!能不能以自然日来做成多日K线?

欣儿 2005-8-2 21:11

:cool::cool::cool:多谢!

cwy 2005-8-2 21:20

[quote]Originally posted by [i]joneslee[/i] at 2005-8-2 20:55:
谢谢楼主!能不能以自然日来做成多日K线? [/quote]
把时间座标选自然日座标。

peter109 2005-8-2 21:49

好用

peter109 2005-8-2 22:00

加上 O/H/L/C 更易於判讀

OO:O2,linethick0;
HH:H2,linethick0;
LL:L2,linethick0;
CC:C2,linethick0;

[color=Teal][align=right] 本贴由 peter109 于 2005-8-2 22:04 最后编辑 [/align][/color]

cwy 2005-8-2 22:20

[quote]Originally posted by [i]peter109[/i] at 2005-8-2 22:00:
加上 O/H/L/C 更易於判讀

OO:O2,linethick0;
HH:H2,linethick0;
LL:L2,linethick0;
CC:,linethick0;

[color=Teal][align=right] 本贴由 peter109 于 2005-8-2 22:04 最后编辑 [/align][/color] [/quote]

把O2,C2,H2,L2,=取消,再加linethick0,谢谢peter109朋友。

pengyou 2005-8-3 11:27

才看到
谢谢老师
谢谢  cwy  朋友!

joneslee 2005-8-3 18:40

[quote]Originally posted by [i]cwy[/i] at 2005-8-2 09:20 PM:

把时间座标选自然日座标。 [/quote]
我的意思是周未没有交易也算入K线周期中。

cwy 2005-8-3 20:45

[quote]Originally posted by [i]joneslee[/i] at 2005-8-3 18:40:

我的意思是周未没有交易也算入K线周期中。 [/quote]
你到自然日座标的画面中数一下就知道了。

joneslee 2005-8-3 21:15

[quote]Originally posted by [i]cwy[/i] at 2005-8-3 08:45 PM:

你到自然日座标的画面中数一下就知道了。 [/quote]
:clap::clap::clap:

zhang706 2005-8-4 15:23

,帮你顶啊~~

liuxiang 2005-8-5 11:09

请问此处为何出现:"未定义标识符"
c1:=if(zqdw=1 and ts>0,c,if(barstatus=2,c,0));

oxwuoxwu 2005-8-6 21:57

好用的公式
谢谢了!!!

zxh5110 2005-8-6 22:30

好!谢谢了!!!

xxllxxll 2005-8-7 16:27

谢谢

hotxxx 2005-8-13 21:31

不知道做什么用?

xggs 2005-8-14 11:17

太棒了,谢谢

9558851688 2005-8-14 21:05

非常不错~

快乐人生 2005-8-15 12:08

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[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;

快乐人生 2005-8-15 12:11

没明白

fugoal 2005-8-15 15:19

太棒了,谢谢

touy 2005-8-28 22:44

没明白 ,请附上文字说明,谢谢 !

gdfsjian 2005-9-3 00:01

不错,好东东,谢谢!

kiddy 2005-9-4 09:46

谢谢,不错;)

ajiu 2005-9-4 16:09

好!谢谢了!!!

zhd598 2005-9-25 10:51

好用,谢谢

大炼钢铁 2005-10-1 10:08

好 学习了

jsw945 2005-10-7 11:15

o1:=(ts=0)*o;
c1:=if(zqdw=1 and ts>0,c,if(barstatus=2,c,0));

不知哪句出问题,从上句最后一个开始显示翻黑  o;c1:=if(zqdw=1 and ts>0,c,if(barstatus=2,c,0));    请老师指教!谢谢!

大炼钢铁 2005-10-10 21:58

学习

犇犇 2005-11-5 11:58

xiexie

LeiBin 2005-11-14 22:48

谢谢

boweb 2005-11-15 00:34

谢谢

liws 2005-11-22 20:27

好指标,要是的分析家的源码就好了

无极67019583 2006-1-22 03:57

越看越觉得你可真行。。。。。。

lyk 2006-2-4 09:40

谢谢

nannan9588 2006-4-7 17:05

顶顶顶!!!!

东南人氏 2006-5-13 07:34

谢谢

陈继胜 2006-5-15 23:51

dddddddddddddd

岩松 2006-5-18 18:19

顶顶顶!!!

zjxu58 2006-5-20 11:17

谢谢楼主!

ak99519 2006-5-23 14:15

CWY老师你好,能不能做个30分钟在副图的K线?谢谢!

zhangmeng 2006-6-10 12:51

,谢谢 !

sxsy 2006-10-15 16:06

谢谢!                                                                                                                                                                                                                                                     

5888882003 2007-2-11 03:49

不错,好东东,谢谢!

zhangmeng 2007-5-12 08:29

太棒了,谢谢

liws 2008-3-9 14:19

哪是相当有用啦!!!

哈哈,谢谢!!
页: [1] 2
查看完整版本: 自由周期K线