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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      59 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      143 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      161 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      97 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      283 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X