问题正在解决中
条件永远不成立
数据使用不恰当
请在仔细想想
代码贴出来,逻辑存在,修改比较数据就可以了。
variable:kai=0,b=0;
cc:=ref(c,1);
s:DYNAINFO( 14);
ss:cc*0.003;
sz:DYNAINFO( 12);
ssz:cc*-0.003;
if time>100000 and time<140000 and b=0 then
begin
if DYNAINFO( 14)>cc*0.003 then
begin
sellshort(holding<0,0,market);
buy(holding=0,1,market);
b:=1;
if DYNAINFO( 14)>0.005 then
begin
sell(holding>0,0,limit,c-0.005*c);
end
else sell(holding>0,0,limit,cc);
end
if DYNAINFO( 12)<cc*-0.003 then
begin
sell(holding>0,0,market);
buyshort(holding=0,1,market);
b:=1;
if DYNAINFO( 14)<-0.005 then
begin
sellshort(holding<0,0,limit,c+0.005*c);
end
else sellshort(holding<0,0,limit,cc);
end
if holding>0 and c<llv(l,10) then sell(1,0,market);
if holding<0 and c>llv(l,10) then sellshort(1,0,market);
end
if time>150500 then
begin
sell(holding>0,0,market);
sellshort(holding<0,0,market);
end