送出委託後時間內未成交取消單子

  •   48 
  • 最後發表   桂桂  2024 二月 20
桂桂 發文於   2024/02/17

請問小幫手要如何用程式碼表達

假設我的程式碼為

if filled=0

and time>090300 and time<090600

and position = 0 and filled = 0

then setposition(-800/close,market);

我要怎麼表達如果超過090600未成交的單子則取消

XS小編 發文於   2024/02/20

Hello 桂桂,

 

就以您這邊的例子的話,只要在 090600 之後判斷庫存和部位是否不相等即可。

舉例來說:

if time >= 090600 and position <> filled then CancelAllOrders();

發表回覆
Close