Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

When strategy loses connection

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

  • timko
    replied
    please add my vote to SFT-2395. This is a very much needed function.

    Leave a comment:


  • NinjaTrader_Jim
    replied
    Hello hurleydood,

    I have submitted a vote on your behalf for SFT-2395 (Automatically reconnecting after server side disconnect and re-enable strategies) Please also ensure that you have configured NinjaTrader to receive stock data from TDAmeritrade so the disconnect from IB would not affect the strategies operating on your other data feed.

    Configuring multiple connections - https://ninjatrader.com/support/help...onnections.htm

    We collect interest in feature requests before determining if the feature should be implemented. For that reason we cannot offer an ETA or promise of fulfillment. Upon implementation, the number for the ticket ID can be publicly found in the Release Notes page of the help guide. I will provide a link below.

    Release Notes - https://ninjatrader.com/support/help...ease_notes.htm

    Let us know if there is anything else we can do to help.

    Leave a comment:


  • hurleydood
    replied
    Last night between 11:32PM to 12:45AM my IB connection went down 11 times and all my stock trading strategies got disabled.
    It doesn't make sense because all my stock trading strategies are running on a TDAmeritrade broker and datafeed. My IB connection is only used for futures trading.
    Has this issue been fixed? Add my vote.

    Leave a comment:


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

    Leave a comment:


  • vitormaga
    replied
    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!

    Leave a comment:


  • vitormaga
    replied
    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?

    Leave a comment:


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

    Leave a comment:


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

    Leave a comment:


  • vitormaga
    replied
    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!..

    Leave a comment:


  • cassb
    replied
    Anyone have any more ideas about how to keep the strategy running while the broker disconnects?

    Leave a comment:


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

    Leave a comment:


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

    Leave a comment:


  • NinjaTrader_AlanP
    replied
    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

    Leave a comment:


  • cassb
    replied
    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

    Leave a comment:


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

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by CarlTrading, 05-11-2026, 05:56 AM
0 responses
64 views
0 likes
Last Post CarlTrading  
Started by CarlTrading, 05-10-2026, 08:12 PM
0 responses
35 views
0 likes
Last Post CarlTrading  
Started by Hwop38, 05-04-2026, 07:02 PM
0 responses
199 views
0 likes
Last Post Hwop38
by Hwop38
 
Started by CaptainJack, 04-24-2026, 11:07 PM
0 responses
365 views
0 likes
Last Post CaptainJack  
Started by Mindset, 04-21-2026, 06:46 AM
0 responses
283 views
0 likes
Last Post Mindset
by Mindset
 
Working...
X