Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Replace fixed stop with trail

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

    Replace fixed stop with trail

    For a given strategy, I'd like to enter the trade with an initial fixed stop loss set. Then, if the price moves in my favor by a certain amount, I'd like cancel the existing fixed stop loss and activate a trailing stop in its place.

    Is this possible with the Managed Order API via SetStopLoss() and SetTrailStop()?

    I understand that I can approximate this effect by continuously updating the fixed stop set via SetStopLoss(), but I specifically want to know if that existing fixed stop can somehow be replaced altogether by a trail stop set using SetTrailStop() on an open position.

    Thanks,

    --
    Kevin

    #2
    Hi Kevin,

    Thank you for posting.

    You would need to use unique signal names to cancel the StopLoss order and then in your logic, submit the Trailing Stop and resubmit the Profit Target.

    The reason for resubmitting the Profit Target is because when submitted together they are OCO tied. Since, the initial StopLoss was cancelled, NinjaScript cancelled the Profit Target as well.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by kbnstp View Post
      For a given strategy, I'd like to enter the trade with an initial fixed stop loss set. Then, if the price moves in my favor by a certain amount, I'd like cancel the existing fixed stop loss and activate a trailing stop in its place.

      Is this possible with the Managed Order API via SetStopLoss() and SetTrailStop()?

      I understand that I can approximate this effect by continuously updating the fixed stop set via SetStopLoss(), but I specifically want to know if that existing fixed stop can somehow be replaced altogether by a trail stop set using SetTrailStop() on an open position.

      Thanks,

      --
      Kevin
      You cannot cancel an order submitted via SetStopLoss(), so that which you describe is not possible.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      650 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      370 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      109 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      574 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      577 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X