• 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.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Interactive Brokers: GTC and Time to Enforce

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

    Interactive Brokers: GTC and Time to Enforce

    Hi NT, we use Managed and sometimes UnManaged trade orders through NT's API.

    We recently discovered that Interactive Brokers requires a "Time to Enforce" for GTC orders to execute orders after 1PM PST. Otherwise, the GTC orders are ignored until the intraday trading hours between 6:30AM and 1PM PST. This seems like a silly requirement at IB, but how do we send Time to Enforce information through the UnManaged API?

    BigSurf


    #2
    Hello bigsurftrader,

    The TIF would be controlled by the overall strategies TIF setting. You can configure that when applying the strategy or in its code using TimeInForce:

    https://ninjatrader.com/support/help...imeinforce.htm

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hi Jesse -

      Interactive Brokers requires us to submit the actual time to enforce. Where would we set that in the strategy if we want GTC orders to execute after hours?

      The example that you shared doesn't have a place for us to actually set the timeframe of when GTC orders can be executed.

      Thanks!

      Mark

      Comment


        #4
        According to Interactive Brokers, " a setting attached to the order to trigger outside regular trading hours". Are you saying that be setting "TimeInForce = TimeInForce.Gtc" will attach whatever Interactive Brokers needs to trigger our orders outside intraday hours?

        Comment


          #5
          I just verified that our strategy does have TimeInForce == TimeInForce.Gtc. However, Interactive Brokers is not executing our stop and profit orders outside of regular trading hours.

          Comment


            #6
            Hello bigsurftrader,

            Do you have trigger after hours checked in the connection menu for your IB connection?

            Aside from the strategy setting that should be all that is necessary from NinjaTrader to submit the order to IB with a certain TIF. Are you seeing a rejection for the orders or any other relevant information? Are the orders submitted in NinjaTrader and not being seen in IB or are there any other details you can provide?

            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              Hi Jesse -- we'll check IB settings to see if there's something there.

              Regarding the stop and profit orders, we can see them in SuperDom, and see that they are not executing. They aren't canceled. We can see they are 'working' orders waiting to trigger when hit. However, when hit after hours they do not execute.

              Comment


                #8
                Hello bigsurftrader,

                When you say its not executed what do you mean, are you seeing its not being filled but remains working without any errors?

                Are the orders showing up and showing as working in IB? Or are you seeing it working in NinjaTrader but is not showing in IB?

                Also some clarification on what I said, the setting I was referring to is in the Connections menu in NinjaTrader for your IB connection settings, you may additionally want to check in IB to see if anything in there is being reported.

                I look forward to being of further assistance.
                JesseNinjaTrader Customer Service

                Comment


                  #9
                  Hi Jesse -

                  (1) I can see the stop and profit orders in SuperDom (so working orders)
                  (2) There are no errors or exceptions
                  (3) IB says they can see our GTC orders and confirmed they were properly setup; however, the Time In Force did not provide the actual timing of when the GTC orders could be executed (very odd, i know!); therefore, our GTC orders w/Time In Force enabled were not executed outside of normal trading hours
                  (4) Long story short, our Time in Force orders did not have the actual timeframe they could be enforced therefore they did not execute

                  Comment


                    #10
                    Hi Jessie - under Connection settings I see "Trigger afterhours" enabled, which has been enabled since we setup the IB account.

                    Comment


                      #11
                      Can you please confirm there is no "time element" with GTC Time In Force orders? According to IB there is a time element.

                      Comment


                        #12
                        Hello bigsurftrader,
                        There are no other options in NinjaTrader for the time however the following is mentioned in the connection guide for IB, have you followed this step?

                        https://ninjatrader.com/ConnectionGu...nnection-Guide


                        Trigger after hours: Enable this if you want stop orders to trigger outside of standard trading hours. This will only work if you also have "Allow order to be activated, triggered, or filled outside of regular trading hours" enabled in TWS (Configure > Order > Order Presets > Timing menu)
                        Can i also confirm you are using specifically the version listed in the connection guide, at the time of writing this it is : TWS 973.2

                        I look forward to being of further assistance.
                        JesseNinjaTrader Customer Service

                        Comment


                          #13
                          Thanks Jesse, that solved it for us. There's a configuration setting and it was defaulted to "DAY" which prevented after hours execution but the orders were still live. At Dorman we didn't have this issue. Appreciate all the help you've provided us.

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by superkolleech, Today, 12:46 AM
                          1 response
                          10 views
                          0 likes
                          Last Post MojoJojo  
                          Started by davidwade, Today, 02:51 AM
                          0 responses
                          2 views
                          0 likes
                          Last Post davidwade  
                          Started by aviat72, 04-26-2020, 09:41 PM
                          10 responses
                          90 views
                          0 likes
                          Last Post kissandfly  
                          Started by healthooa, Today, 01:28 AM
                          0 responses
                          7 views
                          0 likes
                          Last Post healthooa  
                          Started by harjinderjit, Yesterday, 08:24 PM
                          0 responses
                          20 views
                          0 likes
                          Last Post harjinderjit  
                          Working...
                          X