-- 作者:历历
-- 发布时间: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
|