Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Moving stop loss below the current price when short

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Moving stop loss below the current price when short

    Hi,

    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

    #2
    Hello mntemel,

    If the position is short, would you not be expecting the price to fall instead of rise?

    Your logic is looking for the close price to be greater than the entry price plus whatever TheTolerance multiplied by TickSize is.

    That sounds like if the price has risen instead of fallen you want to move the stop loss to breakeven which would be on the wrong side of the market if the price has risen (meaning you have lost profit in that trade).

    Can you clarify what you are trying to accomplish?
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    77 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    40 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    63 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    63 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    53 views
    0 likes
    Last Post CarlTrading  
    Working...
    X