請問使用自動交易時,假設我20000進場做多,能在進場的當下就掛出10點的停利單還是出單嗎?
目前使用預設的語法,看起來是要收有獲利超過10點才掛單。請教一下各位大大如何解決?謝謝
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 評論