Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Interactive Brokers Alert override

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

    Interactive Brokers Alert override

    When using NT6.5 and interactive brokers TWS, I have the issue that I cannot manually enter trades in TWS and also have "fat finger" controls active on TWS, when running an automated strategy from NT6.5.

    I think this is because NT overrides the questions that come from TWS in order to automate the strategy.....
    so for example, I have an automatic strategy running in NT linked to TWS. I wish to manually modify a position, in the same instrument. However as I have fat finger limits on - these flash up quickly and are then overridden by NT, and hence cannot transmit the order. The way around this is to widen the fat finger limits, or ensure that every trade manually entered is carefully made to fit between them, but this defeats the purpose of the limits???
    It seems that I have issues with the manual entry whenever the TWS tells me an order is outside my 'precationary limits'. NT overrides this instantly and does not let me enter the order when TWS checks..... is there a way for NT to only override the orders it sends in an not the manual orders i submit.
    thanks.

    #2
    Adina,

    Thank you for your forum post.

    Just so that I understand correctly your looking for a strategy to enter the trade and then for you to manually manage the exit if it has not occured at the end of the day.

    To do this you would then disable the strategy however for the disabling of the strategy to not cancel any open orders you need to change the setting under Control Center->Tools->Options->Strategies->NinjaScript subtab-> and uncheck Cancel Strategy orders on strategy termination.

    Now when you turn off the strategy for the day you can manage these orders manually as if you do not turn off the strategy everytime the strategy recalculates it will move the stop back to the position it should be in.

    Now it is important that you understand account sync before you run strategies live.

    \
    Strategy Position vs. Account Position:
    <http://www.ninjatrader-support2.com/...ead.php?t=4033>
    1st solution:
    You can include the following statement in your code to avoid the strategy to be calculated on historical data.
    // Only run on real-time data
    if (Historical)
    return;
    Add the statement to the top of OnBarUpdate()
    2nd solution:
    You can set 'On starting a real-time strategy' to 'Wait until flat before executing live'.
    This option can be found at Tools-->Options-->Strategies-->NinjaScript-tab.
    3rd solution, would be submitting manual orders to sync the strategy and account positions described in the link


    Let me know if I can be of further assistance.

    Comment


      #3
      Hi Brett, thanks for the reply,
      you have actually understood what I am trying to do, and have nicely answered a few related questions. thankyou.
      however, I still have the issue with the actual overrides in the TWS.....
      Is there a way for NT to only override the orders it sends into TWS an not the manual orders I submit in the TWS itself?
      Without using the option you mentioned above of having to turn off the strategy every time I want to want to manually enter an order.
      thanks.
      (I may be getting ahead of myself, as I am just waiting for a paper trader account to really nail down the process...consider this preliminary homework)

      Comment


        #4
        Hello,

        Not sure I understand what is occuring here can you please further clarify as an manually submitted orders should not override any orders you have submitted into the TWS application dirrectly.

        Also, another option for you to look into is called using ATM Strategies in your NinjaScript where the ATM Strategy then manages the stops and profit targets.

        There is a sample on how this working in the platform under Tools->Edit NinjaScript->Strategies->SampleATMStrategy.

        Also,



        Let me know if I can be of further assistance.

        Comment


          #5
          Hi Brett, thanks for the extra info - I am not interested in just an ATM strategy as I need the entires and the initial stops to be automatic, and from the end of the session I can monitor them after that. I have been directed onto managing these via an automated strategy - so I will look there.

          Re the overrides it is where NT is overriding any fat finger limits questions that come from TWS after I manually enter an order.
          eg; say I wish to place a buy stop limit order that is 20 ticks away from the market, and in TWS I have it set in my parameters to check if something is more than 6 ticks away from the market as a precautionary setting. What happens is the TWS sends up a confirmation dialog box that will come up saying something such as -
          “The following order “Buy 1 AUD SEP 10 @ .8930 exceeds the number of ticks constraint of 6. Are you sure you want to submit this order?” Yes or No
          (6 is the limit that is set but it could be anything)

          If the order is submitted automatically by NT, then there is a message from NT when turning on a strategy that says “Although you have order confirmation enabled, orders, generated by a strategy will be submitted without confirmation”
          So it clearly overrides these confirmation messages.

          Now when NT is connected to TWS the manual trades cannot be entered/transmitted to TWS as the default for such checks as these is NO. What happens is the TWS dialog box flashes up for a second, then it must be that due to the NT connection, it sends through the answer as “No” – in other words – do not submit the order.
          The only way around I can see so far is to disconnect, do the manual order and then reconnect.

          Note: you can change or disable these limits…. But then that defeats the purpose of having limits doesn’t. Particularly as I switch between futures and stocks a lot, and missing a decimal on a market order is not something I would want to do.

          I hope this makes more sense.
          Thanks.

          Comment


            #6
            Hello,

            I am testing this on my side.

            Thank you for your patience.

            Comment


              #7
              Adina,

              Thank you for your patience.

              I will test this later today to see if the same occurs on my side.

              Comment


                #8
                Hello,

                This did not occur on my side. The window poped up and stayed up. I have seen where there is an option in IB to immediately hit the default option as a way to dismiss messages.

                Can you please contact IB one more time and ask them if there are any option to dismiss messages or to automatically select the default option if a message box was to pop up as I think this is what you may be facing.

                Unfortunately I do not know where the option is in IB.

                Let me know if I can be of further assistance.
                Attached Files

                Comment


                  #9
                  Hi Brett, thanks for looking at this.
                  You may be unable to replicate the issue if you don’t have some limits set in TWS. The picture you attached is the TRANSMITTING Question asked that is JUST BEFORE the Precautionary TWS message asking…..
                  “The following order “Buy 1 AUD SEP 10 @ .8930 exceeds the number of ticks constraint of 6. Are you sure you want to submit this order?” Yes or No

                  Under the TWS configuration, I have set a few “fat finger” limits to ensure that errors are minimized.
                  Configure>Global Configuration>Presets>Futures>Precautionary settings>Number of Ticks = 6

                  The number 6 could be anything I like eg; 25. According to the TWS help file….
                  “Precautionary Settings
                  Precautionary values are used by the system as safety checks. If you submit an order that violates any of these custom settings, you will have to confirm your intent to transmit the order before TWS submits it.”…….” number of ticks is also a safety net to prevent you from transmitting a limit order that has a mistyped limit price. If you attempt to transmit a limit order with a price outside of this calculated number of ticks off the market price, you will get a message asking you to verify that you meant to enter the off-percentage price before it will transmit the order. The market price used is the price displayed in either the bid (sell) or ask (buy) field at the time you transmit the order. This option can be left blank. “
                  (I added the underlying to show that the message is meant to come up)
                  So if you could attempt to replicate this applying the inputs then see if you get the same issue it would be much appreciated. If so then you should have the same issue as I do whereby the precautionary message defaults to No.
                  Lastly I am still waiting on an answer from IB, and have followed up with them today.
                  Thanks.
                  Last edited by Adina; 09-01-2010, 09:10 AM.

                  Comment


                    #10
                    Adina, from what I know you should be able to set in the TWS to bypass those precautionary settings if API orders come in (NT ones).
                    BertrandNinjaTrader Customer Service

                    Comment


                      #11
                      as per before, the question is -
                      Why does NT when its connected to the TWS cause this manually entered order to default the precautionary questions answer to No, thereby not allowing an order to be transmitted, without disconnecting NT from TWS?
                      thanks

                      Comment


                        #12
                        NT_Betrand...."you should be able to set in the TWS to bypass those precautionary settings if API orders come in (NT ones)"

                        The issue is NOT with any orders that come via the API from NT.
                        The issue is with any orders I manually wish to enter into the TWS, when NT is connected to it.
                        The NT seems to automatically answer "no" to the precautionary question that is asked by TWS when I manually enter an order and the precautionary settings are on.
                        thanks.

                        Comment


                          #13
                          Adina, thanks for clarifying - I just tried on my end on the ES, size limit set to 2 cars in TWS.

                          All API orders pass ok (for example 5) if the setting to bypass is activated in TWS.

                          Then I tried a manual trade in TWS only for the same size

                          > order confirmation popup by TWS

                          and

                          > popup to confirm trade even though it would exceed entered precautions.

                          Which TWS release version do you use?
                          BertrandNinjaTrader Customer Service

                          Comment


                            #14
                            Hi, My TWS is .....
                            Build 907.7 Aug 2, 2010
                            Jolt Build 1.1.16 Jun 18, 2010
                            Nia Build 1.7.3, Jul 8, 2010
                            ModelNav Build 1.1.28, Jun 25,2010
                            Java Version 1.6.0_18
                            OS: Windows XP (x86,5.1)

                            Its up to date as I have the setting to automatically update.

                            I agree that NT passing to TWS via the API has no problems as it overrides any precautionary checks. The issue is when I manually try to input an order in TWS, I have the precautionary settings on in TWS, and NT is connected to TWS. ((I dont know about a manual order from NT)).
                            I also get the "popup to confirm trade even though it would exceed entered precautions."
                            THIS IS THE PROBLEM - for some reason, the answer defaults to "no" automatically - so it flashes up and disappears quickly, when connected to NT, and hence the order is not actually transmitted.

                            You say you "if the setting to bypass is activated in TWS" - what do you mean by this?

                            thanks.

                            Comment


                              #15
                              Adina,

                              Unfortunately you are using an unsupported version of TWS and we would not be able to comment on how this version behaves with NT. Please downgrade to the supported version of TWS 906 over here: http://www.ninjatrader.com/webnew/su...ivebrokers.htm
                              Josh P.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by bortz, 11-06-2023, 08:04 AM
                              47 responses
                              1,603 views
                              0 likes
                              Last Post aligator  
                              Started by jaybedreamin, Today, 05:56 PM
                              0 responses
                              8 views
                              0 likes
                              Last Post jaybedreamin  
                              Started by DJ888, 04-16-2024, 06:09 PM
                              6 responses
                              18 views
                              0 likes
                              Last Post DJ888
                              by DJ888
                               
                              Started by Jon17, Today, 04:33 PM
                              0 responses
                              4 views
                              0 likes
                              Last Post Jon17
                              by Jon17
                               
                              Started by Javierw.ok, Today, 04:12 PM
                              0 responses
                              12 views
                              0 likes
                              Last Post Javierw.ok  
                              Working...
                              X