我想請問
我出場策略設定
if Position = 1 and Filled = 1 then begin
if profit_point > 0 and Close >= FilledAvgPrice + profit_point then begin
{ 停利 }
SetPosition(0);
end else if loss_point > 0 and Close <= FilledAvgPrice - loss_point then begin
{ 停損 }
SetPosition(0);
end;
end;
if Position = -1 and Filled = -1 then begin
if profit_point > 0 and Close <= FilledAvgPrice - profit_point then begin
{ 停利 }
SetPosition(0);
end else if loss_point > 0 and Close >= FilledAvgPrice + loss_point then begin
{ 停損 }
SetPosition(0);
end;
end;
回測中我針對預設買進價格 以及預設賣出價格
設定市價
以及觸發價
買進價格:+1
賣出價格: -1
兩個數據回測差很多
兩者設置有甚麼差別
以及為什麼會這樣
1 評論