Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

RealtimeErrorHandling Issues

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

    RealtimeErrorHandling Issues

    Hello, I have this problem occur occasionally. Orders are partially executed, and then completely executed perhaps a second later, but during this second of delay, I get an error message saying
    “order rejected – cannot modify the filled order (201)…….”
    NT then promptly closes the “now completed order” and closes down the strategy. This is obviously quite inconvenient, as I am losing the spread and RT commission every time this happens.
    I am not submitting orders with invalid price limits, so I can only assume NT doesn’t like partial fills with time delays. Am I correct with this assumption? Is this normal NT behavior, and could you explain why this happens? Would I also be right in saying that incidences of this problem will increase with larger trade sizes?

    I’ve also looked at using
    RealtimeErrorHandling = RealtimeErrorHandling.TakeNoAction;
    I have not yet experienced any issues with my exits, but sods law will obviously dictate a problem with my exits as soon as I use this!
    In your opinion would it be more prudent to let NT do all the error handling, and I just accept that on a few trades I will get closed out and lose the spread & comm, or is it worthwhile sticking this code in?
    Also if I do suppress NT error handling would it would it solve the problems I'm having?

    Thanks

    I have another thought, I use IB as my broker and trade currencies, is there a way to place an order so that the order amount has to be filled completely, or not at all?
    Last edited by John833; 05-12-2010, 01:27 PM.

    #2
    NT has no restrictions to receiving partial fills. The issue is you may/may not have been overfilled or the likes. Or maybe you were already filled on the order and then all of a sudden you receive another execution on top of that. That would cause the strategy to stop.

    If you use RealtimeErrorHandling to TakeNoAction it would prevent the strategy from stopping, but you will be left susceptible to any tip of error that may occur on your orders. If you get an overfill you will be left with that, if you had an order rejected, you would need to handle that in your code. Every type of protection will need to be programmed into your strategy or else you may run the risk of having an undesired position in the market.

    Unfortunately there is no option to fill all or none.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Josh View Post
      NT has no restrictions to receiving partial fills. The issue is you may/may not have been overfilled or the likes. Or maybe you were already filled on the order and then all of a sudden you receive another execution on top of that. That would cause the strategy to stop.
      Thank you for your reply. You mention that I could have been filled and then another execution comes in, which would have stopped the strategy. Are you referring to an overfill? I am trading live so I know I wasn't overfilled.

      I can understand if there was a problem NT would stop the strategy, but why would it exit the position?

      Also if there wasn't an overfill or an invalid price limits, what else would cause the strategy to exit the position and shut down? (Just trying to understand this)
      Last edited by John833; 05-12-2010, 02:13 PM.

      Comment


        #4
        John833,

        I was referring to an overfill. It is just one possibility that could describe what happened. Unfortunately I would not know what you may have actually ran into per se without the log/trace evidence.

        When NT detects a problem with orders it does not know how a user would want it to be handled. We cannot just leave the position as-is because people may not necessarily be at their computer. NT has to take the most conservative approach possible and that is to stop processing the strategy and close out any position and cancel any orders it may still have. Should you want a different behavior you would have to use the RealtimeErrorHandling property to allow you to customize your own.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Thank you for the explanation.

          Ok, is it possible to disable the feature of exiting the position if NT detects a problem?

          Comment


            #6
            The way to disable it would be to use RealtimeErrorHandling as TakeNoAction.
            Josh P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

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