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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      63 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      35 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      54 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      61 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      48 views
      0 likes
      Last Post CarlTrading  
      Working...
      X