以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  [讨论]为什么显示效果是这样?  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=51539)

--  作者:历历
--  发布时间:2013/5/1 9:12:08
--  [讨论]为什么显示效果是这样?

我用阿火秘笈里的代码,怎么图里出现这种情况啊?

 

阿火秘笈代码:

runmode:0;

variable:zs=0,cc=0,hl=0;

ma5:=ma(c,5);

ma20:=ma(c,20);

entertime:=time>100000 and time<144500;

if holding>0 and cc<=0 then sell(1,1,limitr,o);

if holding<0 and cc>=0 then sellshort(1,1,limitr,o);

if holding=0 and cc>0 then buy(1,1,limitr,o);

if holding=0 and cc<0 then buyshort(1,1,limitr,o);

if cc>0 and l<zs then begin

 sell(1,1,limitr,min(o,zs-0.6));

 cc:=0;

end

if cc<0 and h>zs then begin

 sellshort(1,1,limitr,max(o,zs+0.6));

 cc:=0;

end

if cc>0 and ma5<ma20 then cc:=0;

if cc<0 and ma5>ma20 then cc:=0;

if cc=0 and ma5>ma20 and entertime then begin

 cc:=1;

 zs:=c-10;

 hl:=h;

end

if cc=0 and ma5<ma20 and entertime then begin

 cc:=-1;

 zs:=c+10;

 hl:=l;

end

if cc>0 and h>hl then begin//创新高后,上移hl

 hl:=h;

 zs:=hl-10;

end

if cc<0 and l<hl then begin//创新低后,下移hl

 hl:=l;

 zs:=hl+10;

end

if time>=150000 then begin

 cc:=0;

end

 

图表显示如下:
图片点击可在新窗口打开查看此主题相关图片如下:ccccccccccc.jpg
图片点击可在新窗口打开查看


--  作者:jinzhe
--  发布时间:2013/5/2 9:08:20
--  
需要什么样的效果?
--  作者:历历
--  发布时间:2013/5/2 13:24:31
--  
以下是引用jinzhe在2013-5-2 9:08:20的发言:
需要什么样的效果?

作者的原意是这样的吗?交易这么密集


--  作者:jinzhe
--  发布时间:2013/5/2 13:26:20
--  

。。。。

看代码看的思路,不是看信号