你说的不再开仓是当天不再开仓吗?
平仓后当然不再开仓
VARIABLE:n=0,m=0;
if 开多条件 and n=0 then buy(holding=0,1,market);
if 平多条件 then begin
sell(holding>0,holding,market);
n:=1;
end
if 开空条件 and m=0 then buyshort(holding=0,1,market);
if 平空条件 then begin
sellshort(holding<0,holding,market);
m:=1;
end
if time=CLOSETIME(0) then BEGIN
n:=0;
m:=0;
end
/平仓后当然不再开仓
VARIABLE:n1=0,m11=0;
if 开多条件 and n1=0 then buy(holding=0,1,market);
if PD4 then begin
sell(holding>0,holding,market);
n1:=1;
end
if 开空条件 and m11=0 then buyshort(holding=0,1,market);
if PK4 then begin
sellshort(holding<0,holding,market);
m11:=1;
end
if time=CLOSETIME(0) then BEGIN
n1:=0;
m11:=0;
end
其中:PD4为另外的平多条件,PK4为另外的平空条件。n,m因为重复,改为n1,m11.
这样变动一下可以吗?老师
还不行啊老师,还是13:45分平多仓即空仓后,14点多,仍然还能开仓,这怎么办啊?