Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Dozens of "Connection Lost" before finally getting charts loaded - Please help

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

    Dozens of "Connection Lost" before finally getting charts loaded - Please help

    I can connect to a workspace with no charts, I get the green dot, and proper account information but when I load a workspace with charts I get the "Connection Lost" at least a dozen times before getting a connection to fully populate the charts and remaining stable. Quite frustrating.

    2022-11-03 21:22:02:471|1|2|Apex: Primary connection=Connection lost, Price feed=Connected
    2022-11-03 21:22:34:085|3|2|Connection lost to the NinjaTrader Historical Data Server: hds-us-nt-013.ninjatrader.com
    2022-11-03 21:22:44:400|1|2|Using HDS (hds-us-nt-007.ninjatrader.com/31655)
    2022-11-03 21:23:44:059|1|2|Connection restored to the NinjaTrader Historical Data Server: hds-us-nt-007.ninjatrader.com
    2022-11-03 21:27:08:990|1|2|Apex: Primary connection=Disconnecting, Price feed=Disconnecting
    2022-11-03 21:27:09:125|1|2|Apex: Primary connection=Disconnected, Price feed=Disconnected
    2022-11-03 21:30:10:379|1|2|Apex: Primary connection=Connecting, Price feed=Connecting
    2022-11-03 21:30:11:706|1|2|Apex: Primary connection=Connected, Price feed=Connected
    2022-11-03 21:30:11:713|1|2|Time to auto close position='4:14:45 PM', Enabled=True
    2022-11-03 21:30:11:713|1|2|Using HDS (hds-us-nt-008.ninjatrader.com/31655)
    2022-11-03 21:31:56:801|3|2|Connection lost to the NinjaTrader Historical Data Server: hds-us-nt-008.ninjatrader.com
    2022-11-03 21:32:08:838|1|2|Apex: Primary connection=Connected, Price feed=Connection lost
    2022-11-03 21:32:42:894|1|2|Using HDS (hds-us-nt-005.ninjatrader.com/31655)
    2022-11-03 21:32:43:277|1|2|Connection restored to the NinjaTrader Historical Data Server: hds-us-nt-005.ninjatrader.com
    2022-11-03 21:32:48:472|1|2|Apex: Primary connection=Connection lost, Price feed=Connection lost
    2022-11-03 21:33:07:204|3|4|Failed to process Alert: 'in progress'
    2022-11-03 21:33:07:204|3|4|Failed to process Alert: 'in progress'
    2022-11-03 21:33:07:469|1|2|Apex: Primary connection=Connection lost, Price feed=Connected
    2022-11-03 21:33:07:632|3|2|Market data failed for 'NQ 12-22': 'get_order_book error : 13'
    2022-11-03 21:38:07:372|1|2|Apex: Primary connection=Disconnecting, Price feed=Disconnecting
    2022-11-03 21:38:07:467|1|2|Apex: Primary connection=Disconnected, Price feed=Disconnected
    2022-11-03 21:41:41:145|1|2|Apex: Primary connection=Connecting, Price feed=Connecting
    2022-11-03 21:41:42:713|1|2|Apex: Primary connection=Connected, Price feed=Connected
    2022-11-03 21:41:42:740|1|2|Time to auto close position='4:14:45 PM', Enabled=True
    2022-11-03 21:41:42:741|1|2|Using HDS (hds-us-nt-011.ninjatrader.com/31655)​

    #2
    Hello dieffen,

    Thank you very much for your post and welcome to the NinjaTrader forums!

    Looking at the pattern in which your platform loses connection, I suspect a third-party application to be the culprit.

    We have seen this behavior before when so-called "latency improvement programs" are being used. These programs (e.g. Killer Network or Dell Smartbyte) will interrupt the connection of 'less active' applications to free this bandwidth up for e.g. video games and online videos.

    As real-time data has a very low bandwidth, these applications then consider NinjaTrader to be idle and block the connection, which causes NinjaTrader to reconnect, restarting this cycle.

    If you are aware of any such application being installed, please ensure NinjaTrader is added to the exception list or the application is uninstalled.

    I would also recommend the following steps:
    • Restart your modem and (if applicable) router to reset the routing tables
    • Restart your PC to force a reconnection
    • Also, ensure that your computer is not turning off your Network Adapter to conserve power:
      • Right-click on your Start button
      • Select 'Device Manager'
      • Expand 'Network Adapters'
      • Right-click on your Network Adapter and select Properties > Power Management
      • Uncheck 'Allow the computer to turn off this device to save power' option
      • Click 'OK' to save the changes
      • Do this for all Network Adapters
    • Clear your DNS
    • If you are not already and the option is available to you, connect to the internet using an ethernet cable. Wireless connections are significantly more unreliable.
    • Ensure exceptions have been added to any firewall/antivirus/backup programs for the Documents > "NinjaTrader 8" folder.
    Please don't hesitate to let me know, should you have any further questions in this regard or if the above does not resolve these issues!

    Comment


      #3
      I tried your recommendations other than a direct connection to the modem but still the same problem. Will have to move my computer to make a direct connection and will try this weekend. I did notice that I had on another workspace a lot of old "Follower Accounts" in the NinjaScript on the log....Do I or how can I clear those out? anything my Log and Trace files would shed some light?

      Click image for larger version

Name:	image.png
Views:	270
Size:	19.4 KB
ID:	1222253

      Comment


        #4
        I notice the CPU % gets really high when I connect to a workspace with charts...

        ​​


        2022-11-04 06:26:13:730 OS='Microsoft Windows NT 10.0.19044.0'/'Win32NT'
        2022-11-04 06:26:13:730 OSLanguage='en-US'
        2022-11-04 06:26:13:730 OSEnvironment='64bit'
        2022-11-04 06:26:13:730 Processors=4
        2022-11-04 06:26:13:730 ThreadPool: minWorkerThreads=4 maxWorkerThreads=32767 minCompletionPortThreads=4 maxCompletionPortThreads=1000
        2022-11-04 06:26:14:758 ProcessorSpeed=2.8 GHz
        2022-11-04 06:26:14:758 PhysicalMemory=16384 MB
        2022-11-04 06:26:14:808 DisplayAdapters=1/Intel(R) HD Graphics 4600
        2022-11-04 06:26:14:808 Monitors=2/1440x900|1280x1024
        2022-11-04 06:26:14:808 .NET/CLR Version='4.8'/64bit
        2022-11-04 06:26:14:857 SqlCeVersion='4.0.8482.1'
        2022-11-04 06:26:14:860 ApplicationTimezone=EST +0 hour(s)
        2022-11-04 06:26:14:863 ApplicationTimezone=UTC -4 hour(s)
        2022-11-04 06:26:14:863 LocalTimezone=EST +0 hour(s)
        2022-11-04 06:26:14:870 LocalTimezone=UTC -4 hour(s)
        2022-11-04 06:26:15:070 DirectXRenderingHW
        2022-11-04 06:26:15:084 Copying custom assemblies...
        2022-11-04 06:26:15:267 Loading custom assemblies...
        2022-11-04 06:26:15:267 Loading C:\Users\admed0\Documents\NinjaTrader 8\bin\Custom\NinjaTrader.Custom.dll...
        2022-11-04 06:26:15:526 Loading C:\Users\admed0\Documents\NinjaTrader 8\bin\Custom\NinjaTrader.Vendor.dll...
        2022-11-04 06:26:15:605 Deleting temporary files...
        2022-11-04 06:26:15:636 Copying db and restoring templates...
        2022-11-04 06:26:15:666 Loading third party assemblies...
        2022-11-04 06:26:17:128 Loading 3rd party C:\Users\admed0\Documents\NinjaTrader 8\bin\Custom\Apex.AAA.dll...
        2022-11-04 06:26:17:128 Loading 3rd party C:\Users\admed0\Documents\NinjaTrader 8\bin\Custom\Apex.ByteBuffers.dll...​

        Comment


          #5
          Hello dieffen,

          Thank you very much for your reply!

          The high CPU usage might be explained by 3rd-party indicators. Let's try testing your platform in Safe Mode to verify if this behavior is being caused by a 3rd-party add-on using the steps below.

          Safe Mode will prevent NinjaTrader from:
          • Loading workspaces and connecting on start-up.
          • Loading custom assemblies (i.e. 3rd-party add-ons and NinjaScripts)
          • Getting instrument updates from the server
          To enable Safe Mode, please use the following steps:
          • Shut down NinjaTrader.
          • Hold the CTRL key and double-click the NinjaTrader icon.
          • Keep holding the CTRL key until you see the Control Center.
          • You may then verify you are in Safe Mode by going to Help -> About.
          Once you have opened the platform in Safe Mode:
          • Reconnect to your Data Provider
          • Please open a new chart with no custom bar types/indicators/templates and test for issues.
          Does the behavior persist on this blank Workspace in Safe Mode?
          • If not, please try opening your previous workspace by going to the Control Center > Workspaces drop-down. It may already show as being open. Hit 'close' and do not save and then re-open it again for your windows to re-appear. You will notice that no 3rd-party add-ons are running in Safe Mode.
          Does the behavior return on your regular Workspace in Safe Mode?
          • If not, restart NinjaTrader, and test for the behavior on your Workspace normally once more with your 3rd-party add-ons available. If this reintroduces issues, I suggest rebuilding your workspace, adding 1 add-on at a time.
          • Please keep track of what add-ons you add back in to identify the cause of the behavior if it returns.
          If it does not return, it indicates the error was isolated only to your other Workspace. I also suggest making a backup of your workspace so we can restore a working version of it if the issue returns. You will want to keep this backup file on an external hard drive or uploaded to a cloud drive such as Google Drive, Dropbox, or OneDrive.

          To create a backup, go to the Control Center > Tools > Export > Backup File. Additional information about backups may be read in our Help Guide linked here: NinjaTrader 8 Help Guide — Backup and Restore

          Regarding the follower accounts; Once an order has been submitted, the only way to remove the account would be to reset NinjaTrader's database, as this would remove all historical executions. To do this, please follow the steps below:
          • Shutdown NinjaTrader and Go to the Start Menu
          • Select My Documents > NinjaTrader 8 > db > "NinjaTrader.sdf" file (may only say 'NinjaTrader' depending on your Windows File Explorer settings)
          • Right-click on NinjaTrader.sdf and select "Rename"
          • Name it "OLDNinjaTrader.sdf"
          • Restart the software and NinjaTrader will create a fresh database file to use
          Unfortunately, the following items stored in the old database will be lost:
          • Trading Hours templates
          • Instrument Lists
          • Custom Instruments
          • Historical trade execution data
          • Saved Strategy Analyzer backtest results
          Last but not least, please let me know, should these steps not resolve the issues!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          85 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          48 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          29 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          32 views
          0 likes
          Last Post TheRealMorford  
          Started by Mindset, 02-28-2026, 06:16 AM
          0 responses
          67 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Working...
          X