Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Internal Order Handling Errors

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

    #16
    If the internal order rules are preventing you from coding what you want, then an unmanaged approach is what you need. You can submit, change, cancel however you want and won't have restrictions.

    If you're using the managed approach and have working exit orders, then you need to cancel these before an EnterLimit is accepted. There is no additional restriction on using limit orders for reversals.

    I've created a working example of canceling exit order and submitting an enter limit order for reversal. I will not post it here or provide additional support for it. If you would like to see it as an example on how to do this, you can send in a note to support 'at' ninjatrader 'dot' com. Attn: RyanM.
    Ryan M.NinjaTrader Customer Service

    Comment


      #17
      Originally posted by kenb2004 View Post
      Ryan
      I posted an example code below. Will the code cancel the 2 working Limit Orders and reverse a long open position to a short position? Is there something else that needs to be added or what?
      No, it will not. That is pretty much what I was attempting to do in the same manner.

      Comment


        #18
        koganam

        I've sent a note to Ryan requesting the example, but I haven't received anything from him yet. I'm really not understanding the why Ryan won't just post the example. I'm sure others will be interested. This does seem to be something that would benefit all NinjaTrader users.

        Comment


          #19
          I've sent to both of you the files and anyone else that requests I'm happy to send.

          It's not posted here as the script is just an extension of our dedicated sample for CancelOrder() and not something NinjaTrader provides support for. It's created personally by me as a courtesy, so you can have a working example of limit reversal after a cancel order.

          If you're looking for a more personalized and professionally developed script for your trade ideas, any of our NinjaScript consultants can assist:
          Last edited by NinjaTrader_RyanM1; 06-16-2011, 01:20 PM.
          Ryan M.NinjaTrader Customer Service

          Comment


            #20
            Ryan

            You said in post #8 when asked about CanceOrder being used in Managed Approach:
            Yes, CancelOrder can be used with the managed approach. The sample uses this.
            Did you mean only by using Advanced Order Handling?

            Comment


              #21
              Yes, both CancelOrder and the file I sent you use the managed approach. My answer was a reponse to your question. As far as advanced handling - Yes, you need the IOrders structure when using CancelOrder(), as that's the only way to reference the order object.

              Can the CancelOrder() method be used with Managed Order Handling?
              Ryan M.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