版上各位先進好,請教mc一個內建出場功能:
小弟本來是用setstoploss設定停損,一旦虧損>500就出場:
setstopposition; setstoploss (500);
但因多個進場訊號分別出場的需求,我要用sell from entry的語法出場,所以用positionprofit< -500來出場:
if positionprofit(0) <= -500 then begin Sell from entry("Buy3") next bar at market; end;
可是這二個回測績效卻不相同,請問是什麼問題呢? 謝謝~
setstoploss
是類IOG模式,每個TICK都會判定,進場後馬上有效
而 if 是在換K棒時才會判定