Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Proper Use of OrderEntry

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

    Proper Use of OrderEntry

    In an AddOn, either using Account.CreateOrder or creating new Order() and initialising all relevant attributes individually, what is the proper use of Order.OrderEntry? The documentation seems very slim on this matter. A comprehensive explanation (included into the documentation as well) would be much appreciated.

    Thanks.
    Multi-Dimensional Managed Trading
    jeronymite
    NinjaTrader Ecosystem Vendor - Mizpah Software

    #2
    Hello jeronymite,

    Thank you for your post.

    Order.OrderEntry controls a data field that is required on all order submissions to CME Globex to indicate whether a particular order is being submitted by manual or automated means.

    Automated order entry refers to orders that are generated and/or routed without human intervention. This includes any order generated by a computer system as well as orders that are routed using functionality that manages order submission through automated means (i.e. execution algorithm, like a NinjaScript Strategy).

    Manual order entry refers to orders that are submitted to CME Globex by an individual directly entering the order into a front-end system, typically via keyboard, mouse or touch screen, and which
    is routed in its entirety to the exchange at the time of submission.

    So it would depend on whether the Add-on is submitting orders it calculates for you or if the orders are submitted by say, a button press, which you would want to use for your entries, OrderEntry.Automated or OrderEntry.Manual. In most cases it would likely need to be OrderEntry.Automated assuming the add-on isn't triggering the orders based on user input.

    Please let us know if we may be of further assistance to you.



    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Thanks, Kate. I appreciate you explaining that.

      In my case, my AddOn allows a trader to specify the trade/order parameters and then creates and submits the order(s) with those parameters. From what you have said, I confess to being still a little uncertain of which setting to use for OrderEntry, although I suspect Automated is correct. When I use Account.CreateOrder, it sets Automated.

      Your further comments?

      Thanks.
      Multi-Dimensional Managed Trading
      jeronymite
      NinjaTrader Ecosystem Vendor - Mizpah Software

      Comment


        #4
        Hello jeronymite,

        Thank you for your reply.

        In that case, if the user is specifiying parameters that the system then uses to create orders I would probably say it would be Automated. If it's more of a straight order submission, like the user puts in all the parameters and presses a button to place that order immediately, then it would be Manual.

        Please let us know if we may be of further assistance to you.
        Kate W.NinjaTrader Customer Service

        Comment


          #5
          Thanks, Kate. I appreciate you taking time to respond.

          Perhaps I am missing the subtleties of the usage, but I am still unclear on when to use Manual or Automated. My perspective is that Orders created by a trader specifying various trading parameters to a UI and then pressing a button to execute the Order(s) could be either Manual or Automated, depending on interpretation.

          My AddOn allows a trader to specify various trading parameters and then construct one or more Orders to meet those trading requirements and then submits those one or more Orders to the market. In a sense, it is not really different from using a built-in NinjaTrader UI that takes trading parameters and creates and submits Orders, e.g. Basic Entry or FX Pro, especially if one also uses ATMs. In my case, the trader may, in a single execution, do something as simple as specify a single Order, or may do something as sophisticated as generate multiple Orders on multiple Instruments across multiple Accounts, where some Orders will be Market Orders an others will Limit or StopMarket Orders.

          Is the setting of OrderEntry significant only for Orders that are submitted for Instruments that are on CME Globex, or are there other implications?

          Thanks again for helping to clarify this matter.
          Multi-Dimensional Managed Trading
          jeronymite
          NinjaTrader Ecosystem Vendor - Mizpah Software

          Comment


            #6
            Hello jeronymite,

            Thank you for your reply.

            I've discussed this with my team and the consensus is that if it is a button press that triggers the order(s) to be sent, that should be Manual, if it is submitted through logic, it should use Automated. Currently this is only a requirement of the CME that we are aware of. They basically require us to tag the orders and since you're making an AddOn the order submission could be either manual or automated. In the case of a button though that would be a manual submission.

            Please let us know if we may be of further assistance to you.
            Kate W.NinjaTrader Customer Service

            Comment


              #7
              Thanks, Kate. I appreciate the thoughts of you and the team. Helpful as they are, I am still at something of a loss to know what to choose. In my AddOn, one button press has the potential to create anything from one to hundreds of Orders, some Market, but many Limit or other queued Order types. What should I choose? And does it matter for non-CME Orders?

              Thanks.
              Last edited by jeronymite; 07-27-2020, 03:45 PM. Reason: Clarification
              Multi-Dimensional Managed Trading
              jeronymite
              NinjaTrader Ecosystem Vendor - Mizpah Software

              Comment


                #8
                Hello jeronymite,

                Thank you for your reply.

                If the orders are generated by the user pressing a button, choose Manual. Otherwise, it would be Automated.

                Please let us know if we may be of further assistance to you.
                Kate W.NinjaTrader Customer Service

                Comment


                  #9
                  Thanks, Kate. That's the advice I needed. Much appreciated.
                  Multi-Dimensional Managed Trading
                  jeronymite
                  NinjaTrader Ecosystem Vendor - Mizpah Software

                  Comment


                    #10
                    Doing a little further investigation, this document is definitive on the matter: https://www.cmegroup.com/rulebook/fi...-B-Tag1028.pdf

                    Items 3, 4, 6 and 7 state:
                    3. What is the definition of automated order entry?
                    Automated order entry refers to orders that are generated and/or routed without human intervention. This includes any order generated by a computer system as well as orders that are routed using functionality that manages order submission through automated means (i.e. execution algorithm).
                    4. What is the definition of manual order entry?
                    Manual order entry refers to orders that are submitted to CME Globex by an individual directly entering the order into a front-end system, typically via keyboard, mouse or touch screen, and which is routed in its entirety to the match engine at the time of submission.
                    6. If an individual who is trading manually also uses automated spreading functionality that automates the entry of some orders, should the orders be designated as manual or automated?
                    The manually entered orders must be properly identified with the value “Y” in Tag 1028. The orders generated by automated means, including via automated spreading functionality, must be properly identified with the value “N” in Tag 1028.
                    7. If a person manually enters an order into his front-end system which employs functionality that manages the submission of the order(s) to the CME Globex match engine, should the order(s) be designated as manual or automated?
                    The orders should be designated as automated with a value of “N” in Tag 1028 because the execution algorithm is generating the entry of the orders to the CME Globex match engine.
                    The way I read that, all Orders submitted to CME Globex by NinjaTrader, no matter whether by push of a button or more "algorithmically automated" means, should be tagged as Automatic. Given that this only applies to CME Globex, it would seem to make sense to set all Orders to Automatic.

                    Further discussion welcome.

                    Thanks.
                    Multi-Dimensional Managed Trading
                    jeronymite
                    NinjaTrader Ecosystem Vendor - Mizpah Software

                    Comment


                      #11
                      Hello jeronymite,

                      Thank you for your reply.

                      "Manual order entry refers to orders that are submitted to CME Globex by an individual directly entering the order into a front-end system, typically via keyboard, mouse or touch screen, and which is routed in its entirety to the match engine at the time of submission."

                      This is exactly what I mean by if the user is inputting parameters for the order and then pushing a button to place the order it should be manual. If they are not doing that, it should be automated.

                      Please let us know if we may be of further assistance to you.

                      Kate W.NinjaTrader Customer Service

                      Comment


                        #12
                        Thanks, Kate. I understand. I don't wish to labour the point, but on reading the document in its entirety, it speaks of operators using a "Globex terminal", which would seem to align with the aspect of the definition of Manual which says "routed in its entirety to the match engine at the time of submission". In other words, it seems the document is defining Manual as Order submission on a Globex terminal, and Automated being Order submission on any computer system (no matter whether by button push or algorithm) that is not a Globex terminal and therefore is not "routed in its entirety to the match engine at the time of submission".

                        Thanks for continuing to establish a definitive answer to this.
                        Multi-Dimensional Managed Trading
                        jeronymite
                        NinjaTrader Ecosystem Vendor - Mizpah Software

                        Comment


                          #13
                          This has been quite helpful in further explaining how to use these parameters. Much appreciated.

                          I have noticed an Account API that can result in orders submitted that violate the CME Globex rules. Acount.Flatten() will submits orders to flatten the account but they do not have the automated flag and there's no way to instruct this API to use the automated flag. If this API is used as part of automated trading code and not initiated by the user this would be a violation wouldn't it?

                          Comment


                            #14
                            Hello ntbone,

                            Thank you for your reply.

                            Are you seeing errors stemming from your use of Account.Flatten()? If so that's something we'd want to reproduce and report to our development team. My understanding is that when using Account.Flatten this will be handled by the core of NinjaTrader which will choose the OrderEntry.

                            Please let us know if we may be of further assistance to you.
                            Kate W.NinjaTrader Customer Service

                            Comment


                              #15
                              There's no error being reported by Ninja Trader. If I create and submit orders that have the order set to Automation, the orders are filled and then I call Flatten, the orders that NinjaTrader creates will not have the Automation flag set. If the executions are happening with CME Globex and Flatten was not called by the user but was called by automation code then the orders it creates will have the flag set wrong per CME Globex's rules. Flatten needs to either always set it to automation, or provide a parameter so the orders it creates have it set to automation in order to comply with the rules they set.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by frankthearm, Today, 09:08 AM
                              3 responses
                              9 views
                              0 likes
                              Last Post NinjaTrader_Clayton  
                              Started by yertle, Today, 08:38 AM
                              5 responses
                              15 views
                              0 likes
                              Last Post NinjaTrader_BrandonH  
                              Started by adeelshahzad, Today, 03:54 AM
                              3 responses
                              16 views
                              0 likes
                              Last Post NinjaTrader_BrandonH  
                              Started by bill2023, Yesterday, 08:51 AM
                              6 responses
                              27 views
                              0 likes
                              Last Post NinjaTrader_Erick  
                              Started by NinjaTrader_ChelseaB, 01-08-2017, 06:59 PM
                              80 responses
                              19,667 views
                              5 likes
                              Last Post NinjaTrader_ChelseaB  
                              Working...
                              X