請問自動交易美股回測系統是不是壞了?
同一份程式碼原本可以回測,現在全部都失敗
以下是我原本的程式碼
variable: up(0), down(0), mid(0), SMA(0), profit(0);
up = bollingerBand(close , 20, 2);
down = bollingerBand(close, 20 , -2);
mid = (up + mid)/2 ;
SMA = average(close, 5);
profit = (c-filledAvgPrice) /filledAvgPrice;
if (lowD(1)< down[1] or lowD(2)< down[2]) and closeD(1)> down[1] and c > highD(1) then setposition(3);
if position =3 and c < down then setposition(0, market);
麻煩小幫手了謝謝
1 評論