//多單停損(%)
input: profit_percent(2, "停利(%)");
input: loss_percent(1.5, "停損(%)");
if Filled > 0 then begin
{ 依照成本價格設定停損/停利 }
if profit_percent > 0 and
Close >= FilledAvgPrice*(1+0.01*profit_percent) then begin
{ 停利 }
SetPosition(0, label:="停利出場");
end else if loss_percent > 0 and
Close <= FilledAvgPrice*(1-0.01*loss_percent) then begin
{ 停損 }
SetPosition(0, label:="停損出場");
end;
end;
想改成用TICK停利停損請問要如何更改??
5 評論