if time>09300 and time<144500 then
begin
if 条件 then
begin
buy(1,tn,THISCLOSE);
end
if 条件2 then
begin
sellshort(1,tn,THISCLOSE);
end
end
另外这样:
sj:=time>09300 and time<144500 then
if 条件 and sj then
begin
buy(1,tn,THISCLOSE);
end
if 条件2 and sj then
begin
sellshort(1,tn,THISCLOSE);
end
条件是一样的,为什么测试时,开仓的次数不一样,后者少了几十次,求解。
条件不一样啊~
你第二个
“if 条件 and sj then ”
需要“条件”和"sj"同时成立,当然次数会变少
呵呵!谢谢!