=============================
If marketposition=1 then sell next bar at lowest(low,5) stop;
If marketposition=-1 then buytocover next bar at highest(high,5) stop;
=============================
if marketposition <> 0 then begin
value1 = (maxpositionprofit / currentcontracts / bigpointvalue) ;
if value1 >= pProfit then begin
sell("BX-PercentTrailing") next bar avgentryprice + value1 - value1*pPercentage/100 stop;
buytocover("SX-PercentTrailing") next bar avgentryprice - value1 + value1*pPercentage/100 stop;
end;
end;
=============================
3.用SAR(Parabolic)指標出場
SAR指標本身設計由來就是一個移動停損功能,MC內建「Parabolic LE (多單出場)」及「Parabolic SE(空單出場)」可以直接加入交易訊號使用。 比起上述兩個移動停利機制最大差別是,它的停損點會隨者持倉時間越長設的越近,也就是在抱了一個長波段後,更重視保護獲利(行情結束的機率更高),稍有回檔就出場。