第一個問題
更新後一直發生重新連線一天下來6.7次以上..手機一直跳通知(已排除本身網路問題)
第二個問題
回測結果不同,爬文了一下,很多都是時間上或者手續費設定或是每日交易次數不同導致!
請小邊也幫我看一下!
我自己是檢查很多次,同策略同時間同手續費,等於是同一個策略同時按了3次回測,也沒有時間逾期問題!
但3次結果都不同,怕是自己笨拙語法造成,也嘗試讓進場腳本簡易一點或出場簡易一點但結果還是一樣,每次回測結果都不同!
不管腳本如何邏輯上應該要每次回測都一樣才對(以下附上腳本)及回測報告截圖!
input:intime(110000,"time");
input:intime2(113000,"time");
var: long_condition(false);
setBackBar(100);
setBarBack(100);
long_condition = currentTime > intime and currentTime < intime2
and C cross Over getField("參考價", "D")*1.06
and close>=20 and close<=110;
if Position = 0 and Filled = 0 and long_condition then begin
SetPosition(1, MARKET);
end;
input: profit_percent(5, "停利(%)");
input: loss_percent(5, "停損(%)");
if Position = 1 and Filled = 1 then begin
{ 依照成本價格設定停損/停利 }
if profit_percent > 0 and Close >= FilledAvgPrice*(1+0.01*profit_percent) then begin
{ 停利 }
SetPosition(0);
end else if loss_percent > 0 and Close <= FilledAvgPrice*(1-0.01*loss_percent) then begin
{ 停損 }
SetPosition(0);
end;
end;
4 評論