I'm trying to add a rule where the open position reaches the negative tolerance level, then I want to move my stop loss to break even (in case price goes back to to level again). I added this piece below into my strategy, but as soon as the criteria is met, it closes the position. So now I'm guessing I can't move my stop loss below the current price when I'm short. Is there a way around this?
if (Position.MarketPosition == MarketPosition.Short && Close[0] >= Position.AveragePrice + TheTolerance * TickSize)
{
SetStopLoss("sell", CalculationMode.Price, Position.AveragePrice, false);
}
thanks
M
Comment