寫了一個很簡單的程式,有庫存的情況下,日逐筆測試,策略部位依庫存,執行結果卻異常
例如華通72.8=>應 (買72.51;賣73.09 ), 實際只有09:04 的72.5買進無賣出
成交明細中09:00:26 就已經有73.1 09:00:47(73.2)的價格出現,為何都沒賣出?
input:x1(0.4,"百分比")
if position=0 and filled=0 and close < open*(1-x1/100) then buy(1,close,label:="買1");
if filled=1 and close > open* (1+x1/100) then sell(1, close,label:="賣1");



3 評論