小編 教授 您好
ㄧ下是我的出清策略.可是我還是無法在當前K急拉後出現上影線抓取ㄍ高點.導致下一根K沒處發出清.以下是我出清腳本
再麻煩幫我看一下.謝謝
// === 停損 / 移動停利邏輯 ===
If Position <> 0 and IsFilled = True and (CurrentTimeVar - ppTime > 3) then begin
if Position > 0 then begin
TickLossPrice = AddSpread(MyEntryPrice, -TickLoss);
if Close <= TickLossPrice then begin
IsFilled = False;
SetPosition(0);
{Print("多單停損出清");}
end
else if UseTrailingStop then begin
max_profit_price = MaxList(max_profit_price, High);
valuee1 = AddSpread(MyEntryPrice, MoveProfitStartTicks);
if high >= valuee1 then
TrailingStopPrice = AddSpread(max_profit_price, -TrailingStopTicks);
if Close <= TrailingStopPrice and Close >= valuee1 then begin
IsFilled = False;
SetPosition(0);
{Print("多單移動停利出清);}
end;
end;
end
2 評論