Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trailing Stop Hell

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

    Trailing Stop Hell

    Hi

    Are there any know issues with using trailing stops with Ninja Trader on a machine where you have Apex with Rithmic installed?

    I have a strategy which I was testing without trailing stops and all worked fine. As soon as trailing stops were introduced I get errors all over the place (see attached). I am using​
    SetStopLoss(), SetProfitTarget(), and SetTrailStop().​

    I have tried many different things then in a chat room and there were comments trailing stop over runs etc. due a bug somewhere

    I have the full code if you want to see

    Thanks

    Stuart
    Attached Files

    #2
    Hello thatsfresh,

    Thank you for your post.

    Currently, we are not aware of nor have we received any other reports of SetTrailStop() not working properly using Apex/Rithmic.

    However, please note it is not supported to use both SetTrailStop() and SetStopLoss(). This is noted in the documentation:

    "The SetTrailStop() method can NOT be used concurrently with the SetStopLoss() or SetParabolicStop() method for the same position, if any of methods are called for the same position (fromEntrySignal) the SetStopLoss() will always take precedence. You can however, use all three methods in the same strategy if they reference different signal names.​"




    If your stop orders are getting rejected due to an invalid price, we have a support article that goes into detail on this subject. Since you're using Set methods, make sure you are resetting the Set method when your strategy is flat. The article below goes into more detail.



    The OCO error is due to your stop loss getting rejected. This often occurs with SetStopLoss() and SetProfitTarget() as well as with Atm Strategies, should one of the exit orders be rejected. For example, the stop is submitted with OCO ID ‘12345’ at an invalid price and is rejected. The target is attempted to be submitted with the same OCO ID ‘12345’, however errors the OCO cannot be re-used as this was used with the stop order, which was rejected.

    Please let me know if you have further questions.

    Comment


      #3
      Thanks for the quick reply. I will review my code and have another go over the weekend. Will let you know if I have any further questions. Thanks!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      113 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      60 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      40 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      43 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      81 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X