Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unmanaged Orders "Cancel Pending"

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

    Unmanaged Orders "Cancel Pending"

    I have been using Unamanged orders lately and using some fast logic.

    I think what is happening is I am using a duplicate OCO, most of the time, I get the error back, but sometimes NT8 gets confused and ends up with "Cancel Pending" and it just stays in that state.

    I an using NT Brokerage. I have attached a screenshot of what I mean.
    Attached Files

    #2
    With a little more testing, it could be related to NT8 not honoring this setting on OCO issues:
    RealtimeErrorHandling = RealtimeErrorHandling.IgnoreAllErrors;

    Even with this setting, I get the OCO error dialog box. This seems incorrect given the request to ignore. The box stays open and additional errors might be sent to the busy dialog box.
    Attached Files

    Comment


      #3
      Hello,

      The RealTimeErrorHandling property relates specifically to handling rejection errors coming from a brokerage, so it sounds like that would not come into play here (unless you are actually receiving order rejections from a brokerage in this instance).

      Can you please share a snippet of the code that you believe is submitting duplicate OCO ID's, so I can test and verify this behavior on my end?
      Dave I.NinjaTrader Product Management

      Comment


        #4
        Originally posted by NinjaTrader_Dave View Post
        Hello,

        The RealTimeErrorHandling property relates specifically to handling rejection errors coming from a brokerage, so it sounds like that would not come into play here (unless you are actually receiving order rejections from a brokerage in this instance).

        Can you please share a snippet of the code that you believe is submitting duplicate OCO ID's, so I can test and verify this behavior on my end?
        Hummm... How do I ignore real-time errors during sim testing (forward testing live)? I just seems like this OCO error (first of all the dialog looks wrong as it had invalidindex or something as the OCO code) slipped past the check for ignoring.

        There isn't a snippet of code that generates this unfortunately. I suspect what is happening is the OCO error cancels the order, my strategy (sometimes) will catch the order prior to cancelation and try to modify it which may confuse NT8 order handling. This might be due to the dialog box being presented on the screen, when I don't think it should be since Ignore is set.

        I might be able to get the Trace Files for this situation if you think that will help. The strategy might produce this error once a day, but indicates there may be some timing/logic with updating Unmanaged orders (when in pending) which should be reviewed.

        Comment


          #5
          You may be able to get around this just by catching the error manually and handling it in a different way. if I could see your order-entry logic, that may help me to pinpoint the cause or a solution to catching/handling the exception.
          Dave I.NinjaTrader Product Management

          Comment


            #6
            David,

            The structure of the library probably will not handle an exception catch very well. Is this on Developments radar to be corrected. I would expect this to be a Rejected order like any others and regardless of the source of the error. This should be handled through the OnOrderUpdate() type of functions as documented here:

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by algospoke, Yesterday, 06:40 PM
            2 responses
            18 views
            0 likes
            Last Post algospoke  
            Started by ghoul, Today, 06:02 PM
            3 responses
            14 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by jeronymite, 04-12-2024, 04:26 PM
            3 responses
            44 views
            0 likes
            Last Post jeronymite  
            Started by Barry Milan, Yesterday, 10:35 PM
            7 responses
            20 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by AttiM, 02-14-2024, 05:20 PM
            10 responses
            180 views
            0 likes
            Last Post jeronymite  
            Working...
            X