你好,我想問一下
我下方寫的出場腳本,對期貨有用,但對選擇權卻無法自動停利停損,不知哪有誤?

//++多單停利:
input:_win_point(10,"幾點停利");
if position > 0
and Close - FilledAvgPrice > 0
and Close - FilledAvgPrice >= _win_point
then begin
SetPosition(0, MARKET,label:="多單停利:點數停利");
end;
//++空單停利:期貨
if position < 0
and FilledAvgPrice - close > 0
and FilledAvgPrice - Close >= _win_point
then begin
SetPosition(0, MARKET,label:="空單停利");
end;
//---■停損■---
//多單停損1:
input:_point_loss(20,"X點停損");
//++多單停損
if position > 0
and Close - FilledAvgPrice < 0
and FilledAvgPrice - Close > _point_loss
then begin
SetPosition(0, MARKET,label:="多單停損 ");
end;
//++空單停損
//input:_point_loss(10,"幾點停損");
//空單停損1:
if position < 0
and FilledAvgPrice - Close < 0
and Close - FilledAvgPrice > _point_loss
then begin
SetPosition(0, MARKET,label:="空單停損");
end;
1 評論