請問我使用警示腳本單純做進場條件回測,回測結果是正確的,但換到交易腳本時卻完全不一樣,
警示腳本如下:
condition1 = close < close[1] and close[1] < close[2] and close[2] < close[3] and close[3] > close[4] ;
if condition1 then ret=1;
交易腳本如下:
condition1 = close < close[1] and close[1] < close[2] and close[2] < close[3] and close[3] > close[4];
if position = 0 and filled = 0 and condition1 then setposition(1,market);
if IsFirstCall("Date") and position > 0 and filled > 0 and condition1 then buy(1,market);
另如果交易腳本不加上 IsFirstCall("Date") 這個函數名稱的話,即使回測選單勾選每日只進場1次的選項,回測出來還是會1天進場很多次,是因為我使用的是體驗版嗎?
再麻煩大神解惑,謝謝
6 評論