關於自動交易

  •   60 
  • 最後發表   swer  2022 一月 05
swer 發文於   2022/01/03

自動交易發生這種問題 該如何排除

有點莫名其妙

XQ小幫手 發文於   2022/01/05

Hello swer,

 

依據您提供的圖片,這跟安控中心和商品設定沒有關係,應該是腳本的問題。

主要是因為您一直下同樣的交易指令 (ex. setposition(0)) 所導致。

建議您可以增加 position 和 filled 當作條件的依據。

舉例來說:

condition1 = 進場條件...;

condition2 = 出場條件...;

if condition1 and position = 0 and filled = 0 then setposition(1, market);

if condition2 and position = 1 and filled = 1 then setposition(0, market);

發表回覆
Close