关闭固定轮询模式是这样?大家找一找原因?
input:n(4,1,55,1){止损量};
variable:cc=0,zs=0,hl=c;
ma5:ma(c,5),LINETHICK2;
ma10:ma(c,10),LINETHICK2;
if holding=0 and cc>0 then buy(1,1,market);
if holding=0 and cc<0 then buyshort(1,1,market);
if cc>0 and l<zs then begin //盘中,平仓
cc:=0;
sell(1,1,market); //测试是次周期开盘价,实盘是市价
end
if cc<0 and h>zs then begin
cc:=0;
sellshort(1,1,market);
end
if cc=0 and ma5>ma10 then begin
cc:=1;
zs:=c-n; //止损量
hl:=h;
end
if cc=0 and ma5<ma10 then begin
cc:=-1;
zs:=c+n;
Ll:=l;
end
{ if cc>0 and h>hl then begin
hl:=h;
zs:=hl-10;
end
if cc<0 and l<Ll then begin
Ll:=l;
zs:=hl+10;
end }