Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Managed Approach Orders question

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

    Managed Approach Orders question

    HI,

    It appears that if I am using the live until cancelled option for placing orders (Managed Approach) and I want to change the order, I have to cancel the order and resubmit it. If this isn't correct, could someone please point me to the correct place in the documentation?

    Also, I know simulated stops are held on the local machine but where is the information contained in IOrder held? If I test IOrder (myOrderVariable).LimitPrice or .StopPrice, is that call going beyond my address space or worse yet over the internet to a remote server, and if so, what is the relative time cost of doing that vs. storing those same variables in a local variable within the strategy?

    I need this information in various places in my strategy and it seems silly to store it separately from the IOrder object unless there is a performance hit to using the IOrder object.

    Thanks,
    Scott

    #2
    Scott, the IOrder call would be to the local reference object tracking the order related property changes, so I don't see a performance 'hit' here.

    Which NinjaTrader version are you using here?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Bertrand, I am using version 7 build 19. I thought the calls would be local but since I am making the call in more than one place, I wanted to be sure.

      I had another question about CancelOrder() in my post. I want to stay with live until cancelled but can't see a way to modify an order without cancelling it and then resubmitting it. Is there an easier/faster way?

      I ask because the way the CME matching engine works now, it is much faster to modify an order rather than cancel/replace the order.

      Thanks,
      Scott

      Comment


        #4
        Hi Scott, good point on the modification vs submitting fresh difference. You should be able to just resubmit the original order to 'update' it to a new price even with LiveUntiCancelled set to 'true' - have you checked with the TraceOrders to debug?
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Oops, I hadn't even thought to try that. As always thanks for your help and guidance.

          Scott

          Comment


            #6
            Double oops, now I remember why I didn't do that. How does NinjaTrader sort through whether this is a new order or a modification of the old order and what happens to the old order?

            Is there a link that explains this when using live until cancelled? I have read the documentation but it didn't seem to address this issue.

            Scott

            Comment


              #7
              Scott, I'm sorry I don't follow you, in the TraceOrders output you would see amended orders showing as such - http://www.ninjatrader.com/support/f...ead.php?t=3627
              BertrandNinjaTrader Customer Service

              Comment


                #8
                I can probably figure it out now that I see how to use TradeOrders (I am new to NinjaTrader but a very experienced trader/programmer).

                If I have an IOrder object representing a new order (live until cancelled) and I modify that order via EnterLongLimit(), I then assume NinjaTrader sees all subsequent calls to EnterLongLimit as modifications to the original order.

                So far, so good but then how would I get a second order out if I needed one because it seems that it would always think I am modifying the first one. Worse yet, assuming I can do that and now have 2 orders (live until cancelled), then how would NinjaTrader know which order to modify if I again called EnterLongOrder.

                In the end, I am asking how NinjaTrader tells the difference between a modification to an existing order and a brand new order if you are using the Managed Approach with live until cancelled.

                Thanks, I hope I am being a little more clear.

                Scott

                Comment


                  #9
                  Scott, if you need to work with two concurrent ones, just use a new IOrder object then for this task to separate - NinjaTrader knows which order to update as you would supply the change via resubmitting the order with the orignal used signal name used for internal tracking.

                  Another way to know to be working with a unique order id, is the NnjaTrader internally generated token value you can access, too in your code.



                  For a sample how to work with IOrders, please see this link below -

                  The OnOrderUpdate() and OnExecution() methods are reserved for experienced programmers. Instead of using Set() methods to submit stop-loss and profit target orders, you can submit and update them manually through the use of IOrder and IExecution objects in the OnOrderUpdate() and OnExecution() methods. The OnOrderUpdate()


                  Note: in NT7 you can now compare the IOrder objects directly for equality while for 6.5 the token needed to be used.
                  BertrandNinjaTrader Customer Service

                  Comment


                    #10
                    Perfect, thank you so much. Have a great weekend.

                    Scott

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by zstheorist, Today, 07:52 PM
                    0 responses
                    3 views
                    0 likes
                    Last Post zstheorist  
                    Started by pmachiraju, 11-01-2023, 04:46 AM
                    8 responses
                    149 views
                    0 likes
                    Last Post rehmans
                    by rehmans
                     
                    Started by mattbsea, Today, 05:44 PM
                    0 responses
                    5 views
                    0 likes
                    Last Post mattbsea  
                    Started by RideMe, 04-07-2024, 04:54 PM
                    6 responses
                    33 views
                    0 likes
                    Last Post RideMe
                    by RideMe
                     
                    Started by tkaboris, Today, 05:13 PM
                    0 responses
                    5 views
                    0 likes
                    Last Post tkaboris  
                    Working...
                    X