以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  2.3版画线的疑问  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=4983)

--  作者:阿火
--  发布时间:2011/1/25 14:11:17
--  2.3版画线的疑问

variable:zs=0,zy=0,flag=0,mmj=0;
ma5:=ma(c,5);
ma18:=ma(c,18);
ma6:=ma(c,6);
ma12:=ma(c,12);
ifkd:=cross(ma5,ma18);
ifpd:=cross(ma12,ma6);
ifkk:=cross(ma18,ma5);
ifpk:=cross(ma6,ma12);
aa:holding,linethick0;

 

if L<zs and holding>0 then sell(1,1,limitr,min(o,zs));
if h>zy and holding>0 then sell(1,1,limitr,max(o,zy));
if ifpd and holding>0 then sell(1,1,thisclose);
if h>zs and holding<0 then sellshort(1,1,limitr,max(o,zs));
if L<zy and holding<0 then sellshort(1,1,limitr,min(o,zy));
if ifpk and holding<0 then sellshort(1,1,thisclose);

 

if ifkd and holding=0 then
begin
  buy(1,1,thisclose);
  zs:=c-30;
  zy:=c+90;
  mmj:=c;
end

 

if ifkk and holding=0 then
begin
  buyshort(1,1,thisclose);
  zs:=c+30;
  zy:=c-90;
  mmj:=c;
end

 

if holding>0 and h>mmj+30 then
begin
  zs:=mmj;
  mmj:=mmj+30;
end

 

if holding<0 and L<mmj-30 then
begin
  zs:=mmj;
  mmj:=mmj-30;
end

 

if holding>0 then zc:zs;
if holding<0 then yl:zs;//记得以前的版本,条件成立的时候才有线条,没成立就没线条。现在却不是,什么问题?

[此贴子已经被作者于2011-1-25 14:12:36编辑过]

--  作者:fly
--  发布时间:2011/1/25 14:43:32
--  

确实显示画线有问题(不影响对ZS的判断和使用),已经在查原因了.

感谢!


--  作者:阿火
--  发布时间:2011/1/25 14:59:15
--  
恩。好的