Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Connection Lost

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

    Connection Lost

    What is the best way to configure NT8 to reconnect after a lost connection? Can it be configured to send an email on reconnect or would that have to be coded?

    Thanks!!

    #2
    Originally posted by RiversideDude View Post
    What is the best way to configure NT8 to reconnect after a lost connection? Can it be configured to send an email on reconnect or would that have to be coded?

    Thanks!!
    Which provider?

    I've been screaming about TDA and failure to reconnect to no avail.

    Comment


      #3
      Hello RiversideDude,

      Thanks for opening the thread.

      There are various settings that you use to configure how your strategies work in the event of a connection loss. These settings can be found in the in the Tools > Options window under Strategies.

      Strategies Options - http://ninjatrader.com/support/helpG...strategies.htm

      You could trigger an email alert when you reconnect. This would involve using OnConnectionStatusUpdate() and SendMail().

      SendMail() - http://ninjatrader.com/support/helpG...s/sendmail.htm

      OnConnectionStatusUpdate() - http://ninjatrader.com/support/helpG...atusupdate.htm

      Connection Handling - http://ninjatrader.com/support/helpG...sshandling.htm

      Please let me know if you have any additional questions.
      JimNinjaTrader Customer Service

      Comment


        #4
        Hey Sledge, right now it's FXCM until the adapter to Forex.com is ready.

        Thanks Jim

        Comment


          #5
          What is the correct way to re-establish the connection when the error in the attached image happens?

          Also, the output window froze and I couldn't scroll up, is that normal or expected behavior?

          Thanks!!
          Attached Files
          Last edited by RiversideDude; 04-20-2017, 05:24 AM.

          Comment


            #6
            Hello RiversideDude,

            These On Connection Loss settings can be adjusted in the Strategies category of the Options Menu.



            Recalculate will resume the strategy if the below conditions are not met:
            • If data feed disconnects for longer than the time specified in “Disconnect delay seconds”, the strategy is stopped and the disconnection is logged.
            • If the order feed disconnects and the strategy places an order while disconnected, the strategy is stopped and the disconnection is logged.
            • If both the data and order feeds disconnect for longer than the time specified in “Disconnect delay seconds”, the strategy is stopped and the disconnection is logged.
            KeepRunning will keep the strategy running so long as the Restarts within x minutes has not been exceeded. You can you a very high number to always have your strategy running.

            Stop Strategy will atop the strategy on a connection loss.

            When configuring settings for On Connection Loss, I always suggest to test the strategy with the simulation account and interrupt your internet connection so you know you have the settings you want.

            Could you provide more details as to how we can reproduce a situation where the output window freezes and does not scroll?

            Please let me know if you have any additional questions.
            JimNinjaTrader Customer Service

            Comment


              #7
              Ok, I'll make the config and code changes. But how do I force a re-connect when I found that the connection to the broker has been lost WITHOUT disconnecting and reconnecting, which disables my running strategies and closes my open orders?

              Thanks!!

              Comment


                #8
                Hello RiversideDude,

                We typically recommend to change the On Connection Loss settings to control the strategies behavior during a connection loss.

                If you break the rules that allow you to reconnect with On Connection Loss settings, then the strategy will be disabled.

                You can specify very large values for these On Connection Loss settings so the strategy automatically tries to reconnect numerous times over a very long period of time. Doing this will allow your strategy to resume and not disable it self, and the re-establish the connection.

                There are additional options listed where the strategy will not cancel the entry or exit orders it creates upon disable. If you have these settings unchecked, you can re-enable the strategy so it can resume and attempt to match existing orders if you have the appropriate Start Behavior defined.These options can be found in the Strategies Options documentation I have previously linked in my last 2 posts.

                Please take some time to review the documentation on Syncing Account Positions and Start Behaviors. It is very important to understand how these start behaviors function. I highly advise to test these start behaviors to fully understand how they will react when you are trading with your live account.

                The Syncing Account Position Documentation can be found here: http://ninjatrader.com/support/helpG..._positions.htm

                Please let me know if you have any questions on the material.
                JimNinjaTrader Customer Service

                Comment


                  #9
                  Thanks, I'll give it a try.

                  Comment


                    #10
                    I'm still experiencing disconnects from the broker. The previous instructions spoke about ways to configure the strategy to behave a certain way when the connection was restored. Is that the best I can hope for? Or, can I configure something in NT to reconnect to the broker?

                    Thanks!!

                    Comment


                      #11
                      Hello RiversideDude,

                      Thanks for the additional question.

                      The information provided was to determine how NinjaTrader should try to resume your strategy, and how many times it should try within a certain period of time.

                      These settings will not prevent disconnects but will keep your strategy running under the rules specified.

                      If your strategy is still disconnecting, I would advise to look at the log tab of the Control Center to find out why. You will see an error noted that tells you why the strategy was aborted if it was. From there you will know how you can adjust your settings or your strategy so they work appropriately.

                      For example, you strategy may be aborted from an exceeded number of restart attempts. Solution : Increase number of restart attempts

                      As another example there could be logic in your strategy to place an order. If that order is submitted in a disconnect, another error will be reported and the strategy will abort. Solution: Utilize OnConnectionStatusUpdate() to detect disconnects and prevent strategy actions that would abort the strategy.

                      Please check your log tab and adjust your strategy and settings accordingly. Please also test these settings while trading on the Sim101 account so you can verify you have the right settings you are looking for.

                      If you have a question about an error you are receiving, please copy the entire error and share it with me so I can provide further input.

                      I look forward to being of further help.
                      JimNinjaTrader Customer Service

                      Comment


                        #12
                        It actually has nothing to with the strategy. The log says:

                        MyFXCM Primary connection= connection lost
                        .... lost order connection but will keep running.
                        .... lost price connection but will keep running

                        I also loss connection to NT historical data, but that reconnects. How do I get MyFXCM connection to reconnect?

                        Thanks!

                        Comment


                          #13
                          Hello RiversideDude,

                          The connection should reestablish itself automatically.

                          I have tested this by connecting to my NinjaTrader FXCM account, unplugging my network connection, and plugging it back in.

                          If you can perform a similar test and the connection does not reestablish on its own, please let me know.
                          JimNinjaTrader Customer Service

                          Comment


                            #14
                            Thanks,I'll test this later. In the interest of time, if it doesn't reconnect, how to I fix it so that it does?

                            Thanks!!

                            Comment


                              #15
                              Hello RiversideDude,

                              It is expected that you should reconnect automatically. If that is not the case please let us know.

                              The only other way you could "force" a reconnect is to disconnect from your provider and attempt to reconnect. This will disable the strategy and you will have to use an appropriate Start Behavior so the strategy can match any orders it had submitted previously and manage them.

                              As an example, Immediately Submit has such a behavior to match orders that were previously submitted on start up.

                              Please let me know if I may be of further assistance.
                              JimNinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by bmartz, 03-12-2024, 06:12 AM
                              4 responses
                              32 views
                              0 likes
                              Last Post bmartz
                              by bmartz
                               
                              Started by Aviram Y, Today, 05:29 AM
                              4 responses
                              12 views
                              0 likes
                              Last Post Aviram Y  
                              Started by algospoke, 04-17-2024, 06:40 PM
                              3 responses
                              28 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by gentlebenthebear, Today, 01:30 AM
                              1 response
                              8 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by cls71, Today, 04:45 AM
                              1 response
                              7 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Working...
                              X