Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Braket orders

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

    Braket orders

    In 6.5 ninjascript, if an opening order is in 'working' state, a target & stop order are only added once the parent order is filled.

    If the internet connection goes down or NT crashes before the order is filled, a position is opened & unprotected.

    As bracket orders are supported in IB, it would be nice to see them supported in Ninjatrader as well.

    #2
    There are supported already: http://www.ninjatrader.com/webnew/su...ivebrokers.htm

    Please uncheck "Local OCO simulation"

    Comment


      #3
      Even with "Local OCO simulation" unchecked, the child orders are not transmitted until the parent order is filled.

      Comment


        #4
        Correct. Stops and targets are placed only as you have entered a position and not before.

        Comment


          #5
          Hence the suggestion to have the stop & target in place at the broker before the parent order is filled.

          Comment


            #6
            To clarify: This needed to be a logic provided the broker which AFAIK is not supported by IB. IB does not have a logic like "if order A is filled place orders B and C, where B and C are OCO orders".

            -> there is nothing NT can do

            Comment


              #7
              I believe your statement regarding IB is incorrect, as IB supports native bracket orders.

              Before transmitting any order in TWS, right click the order, and select 'attach bracket order'.

              When the parent is transmitted, the attached child orders are transmitted simultaneously and executed on a OCO basis.

              Comment


                #8
                Thanks for clarification. We'll add your suggestion to the list of future considerations.

                Comment


                  #9
                  This message is 2 months old. Has the ability to attach orders been added to NinjaTrader 6.5? I have hesitated for months going to automated trading because I have experienced disconnections from IB twice (within a few seconds of entering my first order) using their BookTrader interface, and so was not able to get my stop entered. I now only use attached ("bracket") orders.
                  This makes me VERY leary of waiting to hear back from them that I am filled before I submit the order.

                  If parent/child coupling is not natively in NT 6.5, the IB API has extended attribute fields in the order sumbission functions (one of which makes an order a child of another order). Can I access these extended attributes from within a running NinjaScript strategy? It should be trivial to add as a feature, since you have to send them anyway (presumably you currently send blank fields in most cases). If I cannot get to them directly, can I call my own order routine that NT will manage? I have in mind calling my own c# function that places the orders with all attributes set as I want. Maybe I could even override SetStopLoss. If any of these solutions is even possible, but not necessarily supported, I'll buy NinjaTrader today.

                  I am mostly concerned with using NT to handle errors, reconnections, etc. which it does well for my intended purpose. I do not want to be forced to write my own entire trade management program from scratch just to deal with the order entry issue.

                  Please let me know, ASAP.

                  Comment


                    #10
                    Nothing has changed with NT6.5 since my post below.

                    Comment


                      #11
                      I assume you mean there is nothing native in NT. That is fine.

                      So what about the second part of the question? Is it possible to have my own code submit the orders, but NT still control them? i.e., can I call my own version of EnterLong or SetStopLoss from within a NinjaScript strategy? Can I override the parameters sent to the IB API?-I could just enter the correct codes myself if the order structure is accesible. If so, I'll buy NT tonight.

                      Comment


                        #12
                        >> Can I override the parameters sent to the IB API
                        Unfortunately this is not supported.

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by TraderBCL, Today, 04:38 AM
                        1 response
                        4 views
                        0 likes
                        Last Post bltdavid  
                        Started by martin70, 03-24-2023, 04:58 AM
                        14 responses
                        105 views
                        0 likes
                        Last Post martin70  
                        Started by Radano, 06-10-2021, 01:40 AM
                        19 responses
                        606 views
                        0 likes
                        Last Post Radano
                        by Radano
                         
                        Started by KenneGaray, Today, 03:48 AM
                        0 responses
                        4 views
                        0 likes
                        Last Post KenneGaray  
                        Started by thanajo, 05-04-2021, 02:11 AM
                        4 responses
                        470 views
                        0 likes
                        Last Post tradingnasdaqprueba  
                        Working...
                        X