Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共7 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:请教

1楼
hehhh0327 发表于:2011/8/17 9:42:56
想绘制两品种的价差K线图,公式应如何编写
2楼
fly 发表于:2011/8/17 10:18:21

c1: "if07$close" - "if06$close",linethick0;
o1: "if07$open" - "if06$open",linethick0;
h1: "if07$high" - "if06$high",linethick0;
l1: "if07$low" - "if06$low",linethick0;

 

kred:STICKLINE( c1>o1,c1 ,o1, 10,1 ,colorred);//空心实体
kred1:STICKLINE( c1>o1,max(h1,c1) ,max(c1,o1), 0,1 ,colorred);//上引线
kred2:STICKLINE( c1>o1,min(c1,o1) ,min(l1,o1), 0,1 ,colorred);//下引线

kgreen:STICKLINE( c1<=o1,c1 ,o1, 10,1 ),colorgreen;//实心实体
kgreen1:STICKLINE( c1<=o1,max(h1,o1) ,max(c1,o1), 0,1 ,colorgreen);
kgreen2:STICKLINE( c1<=o1,min(c1,o1) ,min(l1,c1), 0,1 ,colorgreen);

3楼
jinzhe 发表于:2011/8/17 10:21:42

c1:="if08$close";
c2:="rb10$close";
o1:="if08$open";
o2:="rb10$open";
h1:="if08$high";
h2:="rb10$high";
l1:="if08$low";
l2:="rb10$low";
a1:=c1-c2;
a2:=o1-o2;
a3:=h1-h2;
a4:=l1-l2;

aa:stickline(a1>a2,a1,a2,8,1),colorred;
ab:stickline(a1>a2,a3,max(a1,a2),0,1),colorred;
ac:stickline(a1>a2,min(a1,a2),a4,0,1),colorred;
ad:stickline(a1<a2,a1,a2,8,0),colorblue;
ae:stickline(a1<a2,a3,max(a1,a2),0,1),colorblue;
af:stickline(a1<a2,min(a1,a2),a4,0,1),colorblue;

4楼
hehhh0327 发表于:2011/8/17 14:36:44
我想求的两品种价差K线的最高价是实时的最高价,不是最高价1-最高价2,这要怎么实现呢
5楼
阿火 发表于:2011/8/17 15:03:27

那就用tick数据

c1:"if09$close#tick"-"if08$close#tick"; 加载在tick图上

6楼
hehhh0327 发表于:2011/8/17 17:08:08
那能利用tick图得到两品种价差5分钟的K线图吗?如果能怎么实现呢
7楼
fly 发表于:2011/8/17 17:12:53

大概不能,能用的方法.这个帖子,都已经说了

共7 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.03516 s, 3 queries.