推 kuojake: 用stop單去寫 09/01 09:35
推 koow: 紀錄最大獲利點數 然後多entryprice+回檔幾%*最大點數 stop 09/01 20:15
感謝版友回覆
修成這樣有得到效果了
Inputs: pProfit(100), pPercentage(10);
value1 = (maxpositionprofit/bigpointvalue) ;
if marketposition>0 and value1>=pProfit then begin
sell next bar at entryprice + value1 - value1*pPercentage/100 stop;
end;
if marketposition<0 and value1>=pProfit then begin
buytocover next bar at entryprice - value1 + value1*pPercentage/100 stop;
end;
但也就變成next bar出場了,績效差了些
※ 編輯: wezn (114.46.142.243), 09/01/2018 21:24:25
推 koow: stop單不會next bar喔 09/01 23:21
推 eweek: 個人經驗這樣寫不見績效比較差,但是至少可以避免細部回測 09/05 18:16
→ eweek: 變成靠杯 09/05 18:17