Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OCO bracket orders when using Zen-fire and NinjaTrader DLL interface

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

    OCO bracket orders when using Zen-fire and NinjaTrader DLL interface

    Hello,

    Is it possible to use esignal EFS to send oco bracket orders to zen-fire account through Ninjatrader DLL autotrade inferface? Where are those oco order pairs been held, zen-fire server or Ninjatrader on local machine? I think when I use IB as broker, those oco bracket orders are maintained by IB server. Am I right?

    - Clearpicks

    #2
    Hi clearpicks, yes you can do so with the NTCommand function available in the DLL interface - http://www.ninjatrader-support.com/H...unctions1.html

    To see where your orders are residing - http://www.ninjatrader-support2.com/...ead.php?t=5349

    In case of IB they recommend OCO on their servers.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hi,
      I am trying to find he best/simplest solution to send an atomic bracket order to IB as can be done via their Java api. The way I do now is to create a text file from within a strategy which is read by a separate application that simply reads/formats and sends orders to IB. I would prefer not to use custom dlls if possible.
      Thanks

      Comment


        #4
        Hi
        I am not clear on where does your OCO order reside?
        I am using AMP Futures.
        Scenerio:
        So I enter a Long position within my strategy with a Profit and Stop/Loss target
        My computer crashes
        I have stepped away, What happens with the order?

        Comment


          #5
          Originally posted by bbucha_stk View Post
          Hi
          I am not clear on where does your OCO order reside?
          I am using AMP Futures.
          Scenerio:
          So I enter a Long position within my strategy with a Profit and Stop/Loss target
          My computer crashes
          I have stepped away, What happens with the order?
          bbucha_stk, the working / accepted orders would stay at the exchange / FCM's server, however NT could not manage the OCO logic, so in case your target for example fills, the stop might fill, too as NT could not cancel it in time for you if disconnected and not running.
          BertrandNinjaTrader Customer Service

          Comment


            #6
            I am sorry not sure I understand your response?
            1) You say the accepted OCO order is at FCM'S server
            2) The however NT could not manage the OCO logic if my computer crashes, I don't understand

            Comment


              #7
              For an OCO setup you would have for example 2 orders working, a target and a stop - NT manages locally on your PC the logic behind those, when one has to be cancelled as the other executed. If NT is not connected and running it would not be able to manage this for you, hence you could end up with an unwanted position size as result.
              BertrandNinjaTrader Customer Service

              Comment


                #8
                Ahh, so hence where I was going with the OCO question...
                1) So what sort of safety logic can we put in our code in this worse case scenerio?
                2) I really thought the OCO was on the server for the safety of the trader

                Comment


                  #9
                  OCO can happen on the server directly, correct - but unfortunately not all technologies supported would support it, hence we have to emulate it in those cases - http://www.ninjatrader.com/support/f...ead.php?t=5349

                  Your code can check for example the OnConnectionStatus() to see if part of the connection is lost, but obviously for a full disconnect / internet outage the 'safety net' is you stepping in and contact your broker by phone if needed.
                  BertrandNinjaTrader Customer Service

                  Comment


                    #10
                    Could you provide NT trading partners that manage the whold order at the server?
                    I assume these partners can have the OCO modified programmattically thru the strategy once it has been placed?

                    Comment


                      #11
                      Hi bbucha_stk,

                      Sure, this is listed here:
                      Note: This information is relevant for NinjaTrader 7 only. For NinjaTrader 8, please click here (https://ninjatrader.com/support/helpGuides/nt8/where_do_your_orders_reside_.htm). CQG Orders in a state "Accepted" or "Working" are at the exchange. If the exchange does not support a specific order type, the


                      You're looking for "OCO (One Cancels Other) functionality is natively supported on their servers."

                      I assume these partners can have the OCO modified programmattically thru the strategy once it has been placed?
                      Not sure what you're looking for here. Can you please clarify?
                      Ryan M.NinjaTrader Customer Service

                      Comment


                        #12
                        Ok so the OCO order is on their server.
                        1)Just making sure I can modify the OCO bracket real-time just as I can if its on my computer.
                        2)So is there a down side with a broker where it resides on their server?

                        Comment


                          #13
                          Correct, with a broker supporting server side OCO it will rest on their server - you can modify the orders as needed still.
                          BertrandNinjaTrader Customer Service

                          Comment


                            #14
                            Thanks, so I can go fishing and auto-trade so to speak.
                            As a safety net add a try/catch block to send me a email alert if I loose connection.

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by Brevo, Today, 01:45 AM
                            0 responses
                            6 views
                            0 likes
                            Last Post Brevo
                            by Brevo
                             
                            Started by aussugardefender, Today, 01:07 AM
                            0 responses
                            3 views
                            0 likes
                            Last Post aussugardefender  
                            Started by pvincent, 06-23-2022, 12:53 PM
                            14 responses
                            242 views
                            0 likes
                            Last Post Nyman
                            by Nyman
                             
                            Started by TraderG23, 12-08-2023, 07:56 AM
                            9 responses
                            384 views
                            1 like
                            Last Post Gavini
                            by Gavini
                             
                            Started by oviejo, Today, 12:28 AM
                            0 responses
                            6 views
                            0 likes
                            Last Post oviejo
                            by oviejo
                             
                            Working...
                            X