下面是我的语句。我计划14点59分全平。14点45分后不再开新仓。但是遇到了问题。14点59分平完仓了,第二天9点整开盘又开仓了。是昨日开仓信号的延续。我希望9点整到下一个信号出来之前不要再开仓。
if HOLDING<0 then begin
sellshort(GG>C OR TIME>=145900,1,thisclose);
end;
if holding=0 then begin
buy (C<GG AND TIME<144500,1,thisclose);
end;
if HOLDING>0 then begin
sell(GG<C OR TIME>=145900,1,thisclose);
end;
if holding=0 then begin
buyshort(C>GG AND TIME<145900,1,thisclose);
end;
if holding=0 then begin
buyshort(C>GG AND TIME<144500,1,thisclose);
end;