請問我要限制一天交易的次數,以下寫法有什麼問題?
以下面寫法想要限制一天交易10次,可是回測時沒有如預期:
if date<>date[1] then value1=0;
if position = 0 and filled = 0 and value1<10 and condition1 then
begin
value1+=1;
SetPosition(1);
end;
if Position = 1 and Filled = 1 then begin
SetPosition(0);
end;
2 評論