if sc then hh1:=hh;
if jc then ll1:=ll;
改成
if sc then hh1:hh;
if jc then ll1:ll;
画不出直线,是不是代码有问题?
ma5:ma(c,5),linethick2,colorwhite;
ma10:ma(c,10),linethick2,colorgreen;
jc:=cross(ma5,ma10);
sc:=cross(ma10,ma5);
nn1:=barslast(jc);
nn2:=barslast(sc);
hh:=hhv(h,jc+1);
ll:=llv(l,sc+1);
if sc then hh1:=hh;
if jc then ll1:=ll;
hhh:hh1;
lll:ll1;
ma5:ma(c,5),linethick2,colorwhite; ma10:ma(c,10),linethick2,colorgreen; jc:=cross(ma5,ma10); sc:=cross(ma10,ma5); nn1:=barslast(jc); nn2:=barslast(sc); hh:=hhv(h,nn1+1); ll:=llv(l,nn2+1); 后面的if语句意思重复,可以删掉 |