Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Struggling to synchronize TWS and NT

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

    Struggling to synchronize TWS and NT

    Hi,

    I have NT connected to IB TWS in simulation mode. Yesterday, a strategy took a position of 336 shares on the symbol AZO (NYSE). Everything went fine.

    Today, at 4 pm the strategy gave the order to close the position and the order was sent but TWS seemed to ignore it. I also tried to close manually the position from NT but TWS didn't close it.

    I restarted NT and I connected again to TWS and I tried again to close manually the position from NT. The position wasn't closed in TWS neither from NT.

    I closed the position directly from TWS and it was correctly flattened. But NT didn't seem to see it. I had to flatten everyting again from NT and it was ok.

    How to avoid those problems?

    thanks

    #2
    Hello,

    Thank you for your post.

    Your log files indicate that you were experiencing connectivity issues between TWS and NT around this time:

    7/19/2011 3:59:40 PM|0|2|IB: TWS forced your connection to close. NinjaTrader is unable to automatically reconnect. Please shut down NinjaTrader and reconnect manually to TWS: An established connection was aborted by the software in your host machine
    7/19/2011 3:59:40 PM|1|2|IB: Primary connection=Disconnected, Price feed=Disconnected


    Can you please specify the build of TWS you are using? Are you on supported build TWS 917? You can check this in TWS under Help--> About.
    MatthewNinjaTrader Product Management

    Comment


      #3
      Thanks fro your fast reply,

      The build id 917.8

      How to solve this problem? If NT gets disconnected from TWS how can I get an alert? Does this happen often?

      Comment


        #4
        Hello guillembm,

        When you are disconnected, you will see the connection state in the bottom left hand corner of the control center turn from green to red.

        This should not happen frequently, however this connection state is not dictated by NinjaTrader.

        Common reasons that contribute to connection stability are:
        • ISP issues
        • Hardware firewall changing IP addresses frequently
        • Dynamic IP addresses changing frequently intraday. Usually this happens once a week buy you may want to check with your ISP. If they do change daily, requesting a static IP address may help.
        • With Windows XP SP2, if you have more than 10 open TCPIP socket connections (10 programs making socket connections through the internet) Windows will randomly shut down some connections
        • Broker/market data servers may be experiencing temporary downtime

        I would also suggest reviewing our Help Guide article on the 'On Connection Loss' options which will help you control how NinjaTrader handles your strategies when you lose connection:



        Please let me know if you have any questions.
        MatthewNinjaTrader Product Management

        Comment


          #5
          Thanks,

          I saw the ConnectionLossHandling.KeepRunning that fits for me. It says "Keeps the strategy running and sends a disconnect email alert".

          Where do I inform the email to be sent?

          Comment


            #6
            Hello,

            Please go to Tools--> Options--> Misc tab and set the "Mail alert messages to" field to your email of choice.
            MatthewNinjaTrader Product Management

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Waxavi, Today, 02:10 AM
            1 response
            17 views
            0 likes
            Last Post NinjaTrader_LuisH  
            Started by Kaledus, Today, 01:29 PM
            5 responses
            13 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by Waxavi, Today, 02:00 AM
            1 response
            12 views
            0 likes
            Last Post NinjaTrader_LuisH  
            Started by alifarahani, Today, 09:40 AM
            5 responses
            23 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by gentlebenthebear, Today, 01:30 AM
            3 responses
            17 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Working...
            X