Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Managed versus UnManaged

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

    Managed versus UnManaged

    I am trying to achieve tight Bracket (1-4 tick) Limit orders with stoploss/profit target.

    1/
    Apart from native OCO in the SubmitOrder command, which can be replicated in managed, what advantage can unmanaged orders provide? ie. is there a major speed advantage in unmanaged OCO?
    2/
    If using managed, is it best to catch the first order fill and cancel the other side of the bracket in OnExecution or OnOrderUpdate?
    3/
    Also, as i would like to switch between Market, Limit and ATM mid-strategy, is it possible to switch between managed and unmanaged during strategy operation or can that flag only be set during initialization?

    Thanks in advance.
    Last edited by ManicMonk; 10-08-2014, 06:13 AM.

    #2
    ManicMonk,

    Thank you for your post.

    Unmanaged will give you full control in how to submit any orders and modify existing ones.
    Additionally, you would only be able to place a bracket order using Unmanaged approach.

    This will be irrelevant as you can only have working orders for the same direction with the Managed Approach. With Umnanaged you would want to track the fill from OnExecution() as this gets called after the OnOrderUpdate() for Filled, ensuring that the fill has taken.

    You would not be able to switch from Managed to Unmanaged during strategy realtime. You can only use one or the other.

    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Cal View Post
      ManicMonk,

      Thank you for your post.

      Unmanaged will give you full control in how to submit any orders and modify existing ones.
      Additionally, you would only be able to place a bracket order using Unmanaged approach.

      This will be irrelevant as you can only have working orders for the same direction with the Managed Approach. With Umnanaged you would want to track the fill from OnExecution() as this gets called after the OnOrderUpdate() for Filled, ensuring that the fill has taken.

      You would not be able to switch from Managed to Unmanaged during strategy realtime. You can only use one or the other.

      Let me know if I can be of further assistance.
      Thanks NinjaTrader_Cal for the quick reply.

      Sorry for not being completely clear.

      I would want to bracket the price with two Limit orders, both in the same direction. So for a predicted Long with price at 1960.00, I would want an EnterLongStop at 1960.25 on one side and a EnterLongLimit at 1959.25 on the other, for example. Is this not possible in managed script?

      Comment


        #4
        ManicMonk,

        I see what you're saying

        Yes, this would be possible. You would need to use IOrder objects so that you can then use CancelOrder() for the other order when one gets filled. This will also give you IOrder object information such as price, name, and OrderState

        http://www.ninjatrader.com/support/h...tml?iorder.htm
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          Excellent,

          Thanks NinjaTrader_Cal

          would below also be true for managed orders?

          Originally posted by NinjaTrader_Cal View Post
          With Umnanaged you would want to track the fill from OnExecution() as this gets called after the OnOrderUpdate() for Filled, ensuring that the fill has taken.

          Also I don't understand what you mean by the fill having taken.
          As I understand it, the normal operation is ..
          an order is placed in OnBarUpdate or elsewhere
          Order updates are sent to OnOrderUpdate.
          These include states such as Accepted, Pending-, Cancelled and Filled.
          Are you saying that these updates are only notifying of the intention to enter that state and not that the order has entered that state?
          Or is it that if using OnExecution a fill may have resulted where the call to OnOrderUpdate has already passed?

          Comment


            #6
            ManicMonk,

            There are three operations here that are done when a fill occurs.

            OnOrderUpdate() is called first, then OnExecution(), and last OnPositionUpdate()

            The OnExecution() is good practice to place your Stop and Profit orders as this is only called when an Execution from the broker has been received.
            Cal H.NinjaTrader Customer Service

            Comment


              #7
              NinjaTrader_Cal

              Originally posted by NinjaTrader_Cal View Post
              ManicMonk,

              There are three operations here that are done when a fill occurs.

              OnOrderUpdate() is called first, then OnExecution(), and last OnPositionUpdate()

              The OnExecution() is good practice to place your Stop and Profit orders as this is only called when an Execution from the broker has been received.
              My interest would be in preventing overfills if at all possible. In that case would it not make more sense to test for order fills or part fills in OnOrderUpdate? This would get the CancelOrder command in earlier, giving less chance of an over-fill.

              Would the commands SetProfitTarget and SetStopLoss in Initialize(), function correctly with the proposed managed uni-directional bracket limit order?

              Thanks for your time.

              Comment


                #8
                ManicMonk,

                This is up to the developer and how they want to handle their trades. I prefer to use OnExecution as it is a confirmation that the order was executed at the exchange and such. However, you are more than welcome to use OnOrderUpdate()

                Yes, the Set() methods would be fine. Note that you won't be able to use Exit() order methods as they will get ignored due to the Set() methods.
                Cal H.NinjaTrader Customer Service

                Comment


                  #9
                  Thanks NinjaTrader_Cal.

                  All the advice on bracket orders, including yours, suggests using unmanaged ordering. Are there any samples available? I'm particularly interested in examples/ snippets dealing with connection loss.

                  Comment


                    #10
                    ManicMonk,

                    I do not have any samples available, however the Help Guide will be the best resource for starting out here -
                    http://www.ninjatrader.com/support/h...d_approach.htm
                    http://www.ninjatrader.com/support/h...tionstatus.htm

                    Let me know if I can be of further assistance.
                    Cal H.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    628 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    359 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    105 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    562 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    568 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X