你好,我想請教一下,如果自動交易時有停止策略再啟動後,並且如下手動選擇部位(或庫存部位),
我的自動尾盤平倉的語法就不運作了,請問這是什麼原因呢?

我非常確認我的自動平倉語法無誤,因前幾日都非常正常執行,目前發現手動選擇部位(或庫存部位)才會失效。
//尾盤平倉
input:_hold(1,"1當沖,0不當沖");
if Position <> 0
and _hold = 1
and (
(currenttime > 045000 and currenttime < 045900)
or
(currenttime > 132200 and currenttime < 132500)
)
then
begin
SetPosition(0, MARKET,label:="尾盤平倉");
//print(date,time,"尾盤平倉",FilledAvgPrice);
end;
2 評論