之前跟小幫手請教了VIX帶入回測,一直失敗的問題,目前推測,是我寫的語法有問題,不知小幫手可否幫檢查一下,
猜測應該是condition3,不正確:
-----------------------------
condition1= close > average(close,5) and close > average(close,10) and close > average(close,20) and close > average(close,60);
condition2= Average(Close,5) > Close[1] or Average(Close,10) > Close[1] or Average(Close,20) > Close[1] or Average(Close,60) > Close[1];
condition3= GetSymbolField("VIX.TF","收盤價") < 20;
if condition1 and condition2 and condition3 then ret=1;
---------------
1 評論