
等级: 专业版
- 注册:
- 2021-5-20
- 曾用名:
|
runmode:0;
variable:cc=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 ma5<ma20 then cc:=0;
if cc<0 and ma5>ma20 then cc:=0;
if cc=0 and ma5>ma20 and entertime then cc:=1;
if cc=0 and ma5<ma20 and entertime then cc:=-1;
if time>=150000 then begin cc:=0;
我很奇怪的是比如“if holding=0 and cc>0”,这个CC>0是绝对不成立的啊,定义全局变量的时候CC就是等于0,现在突然CC>0的条件出来,这个条件是永远不会触发的,不知道我这么理解对不对,请解释一下。
|
|