• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.


No announcement yet.

Partner 728x90


Server Side Bracket Submission

This topic is closed.
  • Filter
  • Time
  • Show
Clear All
new posts

    Server Side Bracket Submission

    To NinjaTrader Support

    I am revisiting an old topic for clarification in the new trading environment -- specifically NT8 sending ES futures stop-loss orders to Dorman and/or Phillips, the two futures clearing brokers for NT Brokerage.

    My question -- and a real concern for most futures day traders using NT8 -- is this:

    Does my protective stop-loss order for a pending entry order reside on the clearing broker's server, or does it stay local on my NT8 platform until entry is triggered? (Please do not provide a link to the 2008 posting by Ray showing where orders reside. That is way out-of-date... this concern requires the latest and most accurate information.)

    The implications are huge. If my protective stop-loss follows the parent entry order and both are held on the broker's server, a loss of Internet connectivity or a NT8 glitch will not cause my position to be filled without a stop-loss. The alternative is a position with no stop-loss protection and unlimited risk. Not to mention that day margin rates only apply when a stop-loss is in effect.

    If the stop-loss is sent with the entry order and resides on the broker's server while the entry order has not yet been filled, please provide a code sample showing the specific NT8 methods to call to ensure we send entry, stop-loss and target orders (i.e. entry + OCO bracket) at the same time... so that all 3 orders are received by the broker simultaneously.

    Thank you.
    Last edited by D Trader; 12-23-2016, 10:29 AM.

    With respect to the code sample, the best way to send a stop loss and profit target order along with an entry order is with the SetProfitTarget and SetStopLoss methods. The documentation on these methods contains code examples.


    A customer has once asked

    What happens if a stop loss held at the exchange is hit while Ninja is disconnected?

    Please note we are only discussing limit and stop orders. Your broker will never place orders for you to change your position without your permission. That said, this depends on your data feed provider. This post (that you mentioned, that is only being provided for the benefit of other users) goes into detail as far as the behavior of exchange held orders when a disconnect occurs.


    If, as a for instance, someone used CQG as their data feed provider, we would see
    Orders in a state "Accepted" or "Working" are at the exchange. If the exchange does not support a specific order type, the order will be active on the CQG servers.
    Most OCO (One Cancels Other) functionality is natively supported on their servers, but please see the disclaimer section here for more information:

    This means that if Ninja is shut down with an order in the Accepted or Working state, it can get filled before Ninja is started again. To see if it is possible to place an order that is not fillable while Ninja is shut down, we can see what all the possible order states are.


    Order State DefinitionColor Code
    InitializedOrder | information validated on local PC | Yellow
    SubmittedOrder | submitted to the connectivity provider | Orange
    AcceptedOrder | confirmation received by broker | Order type color
    WorkingOrder | confirmation received by exchange | Order type color
    Change submitted | Order modification submitted to the connectivity provider | Orange
    Cancel pending | Order cancellation submitted to the connectivity provider/exchange | Orange
    CancelledOrder | cancellation confirmed cancelled by exchange |No color
    RejectedOrder | rejected locally, by connectivity provider or exchange | No color
    Partially filled | Order partially filled | No color
    FilledOrder | completely filled | No color
    Trigger pending | Order held locally on PC and ready to be submitted to connectivity provider | Yellow

    We can see from this chart that Ninja works from Yellow -> Orange -> Light Blue -> Green or Red, and can infer the following :
    • Yellow state : the order never left NinjaTrader.
    • Orange state : I will discuss more about these states in a moment, but there is a mechanism which will ensure these work like light-blue, red, or green states
    • Light blue, Red, or Green : the exchange will process this order

    As far as Orange states go, there is a possibility that
    • An order is in the Orange state
    • Ninja gets disconnected
    • There is no order state confirmation from your broker

    This window is very small. Connections between your data feed provider and the trade desk are some of the fastest connections there are, and are nearly guaranteed to outperform both your computer and your communication over your ISP to your data feed provider. However, this window does exist, and so in the interest of completeness, this may cause an automated NinjaScript strategy to re-send an order. However, in this unlikely event, your data feed provider can detect and reject orders with duplicate IDs.

    There is an unrelated setting you may have seen in the Tools -> Options screen, "Cancel exit orders when strategy is disabled", which will only send a cancellation instruction if an active NinjaScript strategy is either manually disabled, or disabled due to an error. This will not take place during connection loss.

    In any situation like this, it is imperative that you contact the emergency trade desk right away and manage your order over the phone. Their contact information is here :

    24-hour Trade Desk number: 312-423-2234
    Toll-Free: 1-800-496-1683

    Last edited by NinjaTrader_JessicaP; 12-23-2016, 01:20 PM.
    Jessica P.NinjaTrader Customer Service


      Jessica, thank you for your reply. You went to great effort.

      However, your reply never addressed my question!

      I asked specifically about the two futures clearing brokers for NT Brokerage -- i.e. Dorman and Phillips. The answer should be a simple one. (Note that CQG is not a broker for NT Brokerage... it is only a data provider. Data providers have nothing to do with where the orders are held.)

      Here is my question again, restated: Does NT8 send the OCO bracket orders with the parent entry order directly to the broker, and does the broker keep all 3 orders on their server before and after the entry order is filled? [In other words, I can quit NT8 and all 3 orders will still work as intended, at the broker/exchange].

      Both NT8 and the broker must support server-side OCO orders for this to work. The folks at NT Brokerage should know whether Dorman and/or Phillips support server-side OCO orders. And NT Support should know whether NT8 will actually send them directly to these brokers.

      Or are the OCO bracket orders (stop loss and profit target) held on NT8 until the entry order is executed, and then the bracket orders are sent to the broker? [In other words, if NT8 goes down or never receives the execution status from the broker, I could have a position filled with no stop loss]. If this is the case, why haven't server-side OCO orders been implemented, as with most main-stream brokerages?

      Thanks again.
      Last edited by D Trader; 12-24-2016, 08:42 AM.


        Thank you for the opportunity to clarify. In the case of an NT Brokerage account :

        • If your order is in the InitializedOrder, SubmittedOrder, ChangeSubmitted, or CancelPending states : your order or update will not be on the server
        • Otherwise it will be on the server

        We do need to pay careful attention to the OCO disclaimer for NT8 :

        Originally posted by http://ninjatrader.com/ConnectionGuides/CQG-Connection-Guide

        1. When cancelling orders, working orders within an OCO group will only be cancelled if any order of the group is cancelled directly within NinjaTrader. In all other scenarios these working orders will remain working.
        2. An OCO group that has an order rejected will not cancel any remaining working orders in the group. Any pending orders will not be submitted and instead rejected.
        3. There will be an approximate 200ms delay between submission of OCO linked orders.

        As I mentioned before, while it is rare for a disconnection to occur within the 200 ms delay, this situation is possible, which is why the emergency trade desk information was provided.

        You asked

        I can quit NT8 and all 3 orders will still work as intended, at the broker/exchange
        This is correct. Your OCO orders, once on the server, will work even if Ninja is closed. The only thing you can not do when Ninja is closed is cancel your orders.

        I would like to mention that the CQG section is the appropriate section to review for both brokers that currently use the NinjaTrader Continuum connection, since both Ninja and the trade desk are communicating through the same adapter.
        Jessica P.NinjaTrader Customer Service


          Update on Enhancement Request SFT-1091?

          Hello Jessica / NT8 Support,

          Is there a progress update on enhancement request SFT-1091... sending the bracket OCO order to the broker server at the same time as the parent entry order?

          Background: This is done as a OSO set of orders that reside on the broker's server [Parent entry order sends OCO bracket order]-- IF the parent order is filled, the OCO bracket is activated and sent by the broker to the exchange. If the parent never fills, the trader does not need to worry about one of the OCO orders being filled inadvertently, as they are on the broker's server but not yet active at the exchange. (Ultimately, the purpose for sending all 3 orders to the broker's server at once is so that if my computer, my internet connection, or my copy of NT8 fail, my trading capital is protected).

          As an Interactive Brokers client, I know that IB already supports server-side bracket orders. So this should be a no-brainer for an NT8 upgrade... would have expected it in one of the recent releases.

          From my research, it appears Dorman Trading also supports server-side brackets for at least 3 other 3rd-party trading platforms. Why not NT8 as well?

          Interestingly, NT8 is not listed as a 3rd party platform on either the Dorman Trading or Phillip Capital web sites. Even though both firms are the clearing brokers for NT Brokerage. Is this simply a missed opportunity, or should we as NT8 users take guidance from this omission?


            Thank you for your questions and for your continued interest, D Trader. SFT-1091 has not yet been implemented.

            As a technical support specialist, I do not have intimate knowledge regarding your inquiry of why NT8 is not listed at Dorman Trading and Phillip Capital. That said, I have shared your inquiry with the proper department for them to follow up as they see fit.
            Last edited by NinjaTrader_JessicaP; 03-01-2017, 02:45 PM.
            Jessica P.NinjaTrader Customer Service


              Update on Enhancement Request SFT-1091?

              Originally posted by NinjaTrader_JessicaP View Post
              I have shared your inquiry with the proper department for them to follow up as they see fit.
              can someone please provide an update on this. after spending ample amounts of time with both platform and brokerage support I have not received clarity. currently, many brokers (NT supported brokers also) support this very thing which is absolutely crucial for many traders! however it is not clear if it is NT Brokerage, or the platform itself that doesn't have the capabilities to support this server side functionality. Can you please elaborate?

              i'd like to know if we switch brokers to IB or another that supports server side, can NT platform support this? (NT7 & 8)? if not currently can this be implemented via API?


                While some APIs may have this capability, NinjaTrader does not currently utilize these capabilities.

                We continue to track interest for this feature (SFT-1091), however, there is no additional update at this time.
                Patrick G.NinjaTrader Customer Service


                  It's so sad....


                  As an active manual and strategy trader, i have to say it's a betrayal from Ninja to all it's customers. I have a lifetime license and also holding a quaterly paid license - and i'm sad to learn that there is still no fix for OCO issue, however it was promised earlier that it will be taken care of.

                  This kind of approach is nothing else, but pretty much jeopardizing any accounts of any traders, who's trading with Ninjatrader. It's not only any data disconnection, but any platform failures could destroy the whole trading account and i'm very sure, that Ninja would blame anything or anybody else, but themselves.

                  We had to suffer all the initial coding and programming errors for a long time that Ninja 8 offered since the beginning, numerous crashes, order execution errors and such. But at this point it reached an unacceptable problem, where Ninja's lack of proper API integration could cause major failures and hard impact on any live trading accounts.

                  Do you think it's really acceptable?????



                    Thanks for your feedback. Many of the feature in NinjaTrader are implemented based on ideas provided by clients like yourself. A feature request does not guarantee implementation, however, we do consider all feature requests based on many factors including feasibility and user demand.

                    I've added your vote to SFT-1091.
                    Patrick G.NinjaTrader Customer Service


                      Please add my vote


                        Thanks, James108. Added.
                        Patrick G.NinjaTrader Customer Service


                          On still no fix for OCO issues:

                          I also request this be implemented urgentlly and concur with Mozola. It seems that Ninja is presenting us with a very very unprofessional situation. I too am a lifetime 'owner' of the platform.

                          I use a VPS to minimize connection risks. I kindly ask Ninja to step up and provide a professional solution. I will be bringing this up at futures.io


                            Please add my vote for SFT-1091.



                              I've added your vote, sandman.
                              Patrick G.NinjaTrader Customer Service


                              Latest Posts


                              Topics Statistics Last Post
                              Started by mbesha, Today, 08:21 AM
                              1 response
                              Last Post NinjaTrader_Jesse  
                              Started by nailz420, Yesterday, 09:13 PM
                              3 responses
                              Last Post NinjaTrader_Jesse  
                              Started by Newtrader101, Today, 07:59 AM
                              2 responses
                              Last Post Newtrader101  
                              Started by HiddenPhilosopher, Yesterday, 11:24 PM
                              1 response
                              Last Post NinjaTrader_PaulH  
                              Started by pollard89143, Today, 04:21 AM
                              2 responses
                              Last Post pollard89143