input: profit_point(5, "停利(點)");
input: loss_point(10, "停損(點)");
if Position = 1 and Filled = 1 then begin
if close <= (filledavgprice - loss_point) then setposition(0);
//如果收盤價小於進場價格-停損點數就出場
end;
if profit_point > 0 and Close >= FilledAvgPrice + profit_point then begin
{ 停利 }
SetPosition(0);
end;
請問我的停利是不是有寫錯?
我是按照範例寫的
我要寫成成本+5就市價停利
但是我跑模擬自動交易的時候,17277觸發下單,已經到17283了他還是沒有出場,後來跌下去變成停損出場
求指導要怎麼改語法,非常感謝
1 評論