Hi 各位先進
我最近想寫個蠟燭線來回測看看,
於是寫了以下的code,
但從回測的買點前一日看起來都不是有符合我想要的蠟燭線,
無法確定是寫法有誤還是XQ回測功能的bug,
看起來每天都有不間斷交易真的很冏阿,
因此上來請教各位先進的意見,謝謝!
input: CandleHigh(20, "蠟燭線%數");
input: increased(5, "漲幅%數");
//確認當天漲幅%數
if close >= open*(1+increased/100) then condition1 = true;
//確認當天是蠟燭線
if (high-close) <= (close-open)*(1+CandleHigh/100) then condition2 = true;
if open = low then condition3 = true;
ret = condition1 and condition2 and condition3;
1 評論