Automated data freeze solutions

Has anyone explored or found any easy ways to automatically resolve the NT data freeze issues.

Data freeze I refer to is when NT just stops loading live data on futures, and the charts are frozen. You can right click and reload historical data but that updates the chart but the data is still frozen (you can see the bid ask never moves). The only resolution I currently see is to restart my NT and then the data will come back and be fine for a while.

So my goal is to be able to automate the restart or find an action which can revive these data loss periods so that my automated strategies don’t just freeze up.

It seems easy enough to identify the data freeze in the strategy by running the logic inside a timer (and checking if data is updating), but beyond that I don’t see an easy way to trigger the restart of the data programatically.

Interested if anyone ever explored this topic and got anywhere.

I have found over the years that yes, this does happen. Typically, it is just one instrument that freezes in my experience and the others continue. An automated solution would be good. We’ve built watchdogs to let us know when it happens and we manually review the situation before restarting, but an automated restart could probably be done - a lot depends on how your strategies are architected and how they would handle being restarted, for instance, with a position or several underway and exits that are in the market, and might, for instance, be hit on one or the other side of the OCO while you’re restarting. You have to think about all of the edge cases, and design carefully, then test, test, test.

Have (either of) you tried reconnecting in this circumstance. I’ve many many times found this to resolve this situation (particularly when only (as has often been the case for me) one instrument affected, suggesting it may not be a ‘platform freeze’ as such).

Just a thought. If relevant, a whole lot less cumbersome than a platform restart esp if you have Strategies etc
Best,

1 Like

Interesting tip, just gave it a try and you are right the reconnect of the connection does work. Just wonder if that and strategy reenabling could be automated in anyway. Only way I can see it done is using autohotkey or similar.

I do agree in regard to what you say QuantKey_Bruce, having a watchdog is a good solution. The only downside is when selling to customers this all becomes an additional level of work some aren’t really expecting with an automated solution.

#Mayura glad to hear it & nice when thoughts turn out to be pixie dust.
I should also have included, for completeness in case it helps anyone, that the circumstance when this works is nothing to do with ‘internet’ ‘bad’ connection I.e. I’ve tested simultaneously, speed, ping, routing etc and all good. Sometimes - there may be something in the Log citing hds (historical data servers). So it is specifically Ninja’s servers connection.

But I don’t troubleshoot it any longer - just do it as/when required.

Best,

2 Likes

I just had a conversation with my VPS provider about this same issue, this is what he responded below.

Hello,

I’ve taken a look at your NinjaTrader log files, and the problem is the login token for the Tradovate adapter connection you’re using is expiring and failing to renew. Looks like you’re using a live connection, and there’s 2 types of NinjaTrader brokerage connections. The one labeled “NinjaTrader” in your connections dropdown is not stable for automated strategies because it disconnects when the login token expires. It should only be used when you are restarting NinjaTrader daily, please see performance tip# 12 here: https://ninjatrader.com/support/helpguides/nt8/NT%20HelpGuide%20English.html?performance_tips2.htm

Instead for leaving NinjaTrader running over longer periods of time, you should be using the connection called “NinjaTrader Continuum” because the login token for this one does not expire so you can keep it running all week long.

To get your Continuum login, log into www.ninjatrader.com → Select the blue profile icon in the upper right → Settings → Profile → Platform Username

The platform username on this page is the NinjaTrader Continuum username. If it doesn’t display a Continuum username, then please send an email and they will enable it on your account.

For password, click the ‘Request Reset’ button in the ‘Platform NinjaTrader Continuum Password Reset’ section.

Lastly, input that username and password into the NinjaTrader Continuum connection, and try to test the connection.

Please let me know if you have any trouble!

2 Likes

Wow, this is some amazing advice. I have passed it on to my customers and will try it myself. The only annoying thing is quite a few of my customers (and myself) do also trade props on top of the live, and to know that the tradovate connection expires is very frustrating.

That being said, I wish I knew about this solution earlier as I had quite a few customers when I was mostly running cash trading solutions, who were dealing with this data freeze issue on the daily!!

1 Like

I notice that on the NinjaTrader Continuum connection, unlike the regular NinjaTrader one, there is this big warning when you set up the connection:

  1. You can only link 2 orders via a single OCO group.
  2. When cancelling orders, working orders within an OCO group will only be cancelled if any order of the group is cancelled directly within NinjaTrader. In all other scenarios these working orders will remain working.
  3. An OCO group that has an order rejected will not cancel any remaining working orders in the group. Any pending orders will not be submitted and instead rejected.

This seems to imply that this may require more management logic than the regular connection (if the OCO group has more than two orders for item 1 above and in all cases for items 2 and 3).

If switching to the NinjaTrader Coninuum approach gives a more stable connection, that’s worth pursuing for sure, but it might mean strategies have to be modified to address these limitations.

2 Likes