• 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

When strategy loses connection

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

    #16
    Hello cassb,

    There is a max amount of reconnects ninjatrader will attempt over a certain period of time, at which point a strategy disable and reenable will no longer manage the earlier instance.

    The way to work around this would be to run the strategy within an Addon, however this would involve many more considerations.

    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment


      #17
      Is there any indication in the Log or Trace files that NT8 attempted to reconnect? I don't see anything that indicates that in them. We have the

      On Connection Loss = Keep Running
      Disconnect Delay Seconds = 1000000000
      Number of Restart Attempts = 10
      Restarts within X Minutes = 5

      Maybe I should set the Number of restart attempts = 999999999 and Restarts within X Minutes = 99999999. Would that keep it trying to connect? In the case I mentioned, it was disconnected for 3 days over the weekend.

      Is there a way to disconnect/reconnect to our broker data feed and not disable the strategy?


      I hope the NT development and support teams realize that this is a serious, show-stopper problem if using NT as a 24/7 auto-trader.

      Thanks!
      Bryan
      cassb
      NinjaTrader Ecosystem Vendor - Logical Forex

      Comment


        #18
        Hello cassb,

        Even if you set max number of restart attempts to a gazillion, there is internal logic in NT which will disable the strategy after a number less than that.

        There is no way to disconnect and reconnect to your broker and not have the strategy disable but I will submit a feature request for this on your behalf.

        Please let us know if you need further assistance.

        Bryan
        Alan P.NinjaTrader Customer Service

        Comment


          #19
          Originally posted by cassb View Post
          Is there any indication in the Log or Trace files that NT8 attempted to reconnect? I don't see anything that indicates that in them. We have the

          On Connection Loss = Keep Running
          Disconnect Delay Seconds = 1000000000
          Number of Restart Attempts = 10
          Restarts within X Minutes = 5

          Maybe I should set the Number of restart attempts = 999999999 and Restarts within X Minutes = 99999999. Would that keep it trying to connect? In the case I mentioned, it was disconnected for 3 days over the weekend.

          Is there a way to disconnect/reconnect to our broker data feed and not disable the strategy?


          I hope the NT development and support teams realize that this is a serious, show-stopper problem if using NT as a 24/7 auto-trader.

          Thanks!
          Bryan
          You mean that you do not have a routine that automatically places a StopLoss if you are in a position, and there is no StopLoss order standing in the account? If not, then you know what to do. You must make the routine capable of being disabled if desired, or course.

          Comment


            #20
            Originally posted by koganam View Post
            You mean that you do not have a routine that automatically places a StopLoss if you are in a position, and there is no StopLoss order standing in the account? If not, then you know what to do. You must make the routine capable of being disabled if desired, or course.
            Hello, my friend. Well, I am attempting to trade a calendar spread (that's another thread as well) with NT8. So my position is 100% hedged without need for a stop loss. The problem here is that when NT disconnects from the broker, which seems to happen several times per week, then we have to manually manage the position from then on because the strategy gets disabled and loses its internal variables. That defeats the purpose of an auto-trading strategy if you have to manually supervise it and manage the trades! ;-)

            In fact, I have been using NT since v6.5 and have *never* found it capable of unsupervised trading, especially regarding maintaining sync with the broker's positions. The internet appears to be too unstable for a constant connection, and NT handling of disconnect/connects is poor.

            Bryan
            Last edited by cassb; 05-09-2017, 02:51 PM.
            cassb
            NinjaTrader Ecosystem Vendor - Logical Forex

            Comment


              #21
              Anyone have any more ideas about how to keep the strategy running while the broker disconnects?
              cassb
              NinjaTrader Ecosystem Vendor - Logical Forex

              Comment


                #22
                Originally posted by cassb View Post
                Anyone have any more ideas about how to keep the strategy running while the broker disconnects?
                Hi cassb, if i did understand well, i think i have a different problem...
                In my case, with the "keep running" on, if i lost the internet connection just for a few minutes, the strategy keeps running and it reconnects without problem.
                So, what i did was, i have second internet provider(4g mobil internet) configurated as backup if my first internet provider fails.
                But, i still have a problem: if for some reason there is no energy power to supply my computer and my UPS needs to "sleep" the computer (and maintain all in memory), when the energy comes back and "wake up" the computer, the strategys are not disabled and keep running, but Ninja8 is not abble to reconnect the connections... All connections stay red and i need to manual disconnect and reconnect all connections, and doing that it means that i'm force it to disable my strategys...
                Can please there is any one that is able to help us with a way of finding a solution for keeping the strategys allways running no matter what....
                It's crucial for an AUTOTRADER!..

                Comment


                  #23
                  Hello vitormaga,

                  There is no supported method to allow your strategy to always stay running and or reconnect from a broker disconnection. I have submitted a feature request for this for which I will add your vote to.

                  Please let us know if you need further assistance.
                  Alan P.NinjaTrader Customer Service

                  Comment


                    #24
                    Originally posted by vitormaga View Post
                    Hi cassb, if i did understand well, i think i have a different problem...
                    In my case, with the "keep running" on, if i lost the internet connection just for a few minutes, the strategy keeps running and it reconnects without problem.
                    So, what i did was, i have second internet provider(4g mobil internet) configurated as backup if my first internet provider fails.
                    But, i still have a problem: if for some reason there is no energy power to supply my computer and my UPS needs to "sleep" the computer (and maintain all in memory), when the energy comes back and "wake up" the computer, the strategys are not disabled and keep running, but Ninja8 is not abble to reconnect the connections... All connections stay red and i need to manual disconnect and reconnect all connections, and doing that it means that i'm force it to disable my strategys...
                    Can please there is any one that is able to help us with a way of finding a solution for keeping the strategys allways running no matter what....
                    It's crucial for an AUTOTRADER!..
                    Just curious, but should not an autotrader computer be setup to NEVER go to sleep?

                    Turn off the monitor? Sure. Put the computer into low power mode, while not allowing the network connection to be closed? Maybe. Putting the computer to sleep and hence disconnecting the network? I would say not.

                    But for starters, check your network settings, and make sure that it is set to never be turned off by the operating system as a power saving measure. By default, Windows foolishly sets up the network to be disconnected to save power. That means that if you have never changed it, that is the way that it is. Try stopping that nonsense as a first step for your particular case.

                    Comment


                      #25
                      Originally posted by NinjaTrader_AlanP View Post
                      Hello vitormaga,

                      There is no supported method to allow your strategy to always stay running and or reconnect from a broker disconnection. I have submitted a feature request for this for which I will add your vote to.

                      Please let us know if you need further assistance.
                      n the middle while, can you please tell me what is the best Ninjatrader 8 configurations that i can do right now, with the intention to have the maximum time that is possible to Ninja reconnect the connections?

                      Comment


                        #26
                        Originally posted by koganam View Post
                        Just curious, but should not an autotrader computer be setup to NEVER go to sleep?

                        Turn off the monitor? Sure. Put the computer into low power mode, while not allowing the network connection to be closed? Maybe. Putting the computer to sleep and hence disconnecting the network? I would say not.

                        But for starters, check your network settings, and make sure that it is set to never be turned off by the operating system as a power saving measure. By default, Windows foolishly sets up the network to be disconnected to save power. That means that if you have never changed it, that is the way that it is. Try stopping that nonsense as a first step for your particular case.
                        Sure you can make all that, but please tell me what you do when you have no electricity and your UPS batteries are low... You gonna keep running the computer until there is no more power and all crashes?!..
                        I'm always open to good ideas, and if you have better ones in this situation, please tell me, and i really will apreciatate!

                        Comment


                          #27
                          Originally posted by vitormaga View Post
                          Sure you can make all that, but please tell me what you do when you have no electricity and your UPS batteries are low... You gonna keep running the computer until there is no more power and all crashes?!..
                          That falls in the category of: "Nothing can be done." If you do not have power, you cannot run a computer to do anything, period. So that is a completely different class of problem from putting the computer to sleep, and so disconnecting the network.

                          If it is a true autotrader, and you want zero (or close to it anyway) downtime, you may want to look into a high-availability VPS. If the OS shuts down the network stack, it is usually curtains for any program that requires a close to continuous network connection.

                          The other possibility, of course, is to ensure that you have a connection which always places orders server-side. In that case, you will hopefully always have protected positions.

                          That being said, you can try to tune the connection parameters to make NT itself more tolerant of disconnections. This post discusses what I use for NT7. I do not trade with NT8, so I have not yet set up or tested any scenarios.

                          ref: http://ninjatrader.com/support/forum...ad.php?t=96536
                          Last edited by koganam; 06-06-2017, 01:27 PM.

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by Velhinho, Today, 12:30 PM
                          1 response
                          5 views
                          0 likes
                          Last Post NinjaTrader_ChelseaB  
                          Started by EF Hutton, Today, 12:36 PM
                          1 response
                          6 views
                          0 likes
                          Last Post NinjaTrader_Melissa  
                          Started by TraderIqbal, Today, 11:17 AM
                          1 response
                          6 views
                          0 likes
                          Last Post NinjaTrader_PatrickG  
                          Started by frankduc, Today, 11:42 AM
                          3 responses
                          11 views
                          0 likes
                          Last Post NinjaTrader_ChelseaB  
                          Started by bdelorm, Today, 11:10 AM
                          1 response
                          4 views
                          0 likes
                          Last Post NinjaTrader_PatrickG  
                          Working...
                          X