台指期 停損停利問題

  •   66 
  • 最後發表   shawn19735  2025 六月 19
shawn19735 發文於   2025/06/19

請問使用自動交易時,假設我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;

虎科大許教授 發文於   2025/06/19

if position>0 and filled>0 then setposition(0, filledAvgPrice+10);

發表回覆
Close