想請問小幫手,為何我這樣寫只有5分K會有資料,1分K就跑不出來
(回測設定:逐筆交易、每日部位歸零、觸發及判斷成交)
我用print時這些都有顯示,不過回測就會有問題
input: profit_percent(2.5, "停利(%)");
settotalbar(100);
value1 = SwingHigh(High,30,2,2,1);
value2 = SwingHighbar(High,30,2,2,1);
value3=average(volume, 5);
if close<low[value2] then setPosition(-1 ,AddSpread(Close, 3));
if profit_percent > 0 and close <= FilledAvgPrice*(1-0.01*profit_percent) then SetPosition(0,market); //停利
1 評論