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;//记得以前的版本,条件成立的时候才有线条,没成立就没线条。现在却不是,什么问题?
确实显示画线有问题(不影响对ZS的判断和使用),已经在查原因了.
感谢!