Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unhandled exception: Object reference not set

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

    Unhandled exception: Object reference not set

    Hello,

    I keep getting the error: "Unhandled exception: Object reference not set to an instance of an object"

    It then either deletes all the accounts I had in my strategy or makes it unable to load charts. Typically NQ because that is the main instrument I trade on. When I logged on I saw that a couple SIM accounts would not load and would have a yellow circle when the rest would be green. I found a workaround was to delete these yellow accounts but then all my testing data goes with it. When I would log off and back on a new account would be yellow and now the workaround does not work. It is very frustrating. How do I avoid this error from happening and what is the correct fix so this stops happeneing?

    I would be happy to answer any other questions to give a more clear picture of how I trade.

    Any help would be greatly appreciated.

    #2
    Hello litamm89 ​,

    Thank you for reaching out.

    To correct and prevent this error in the future, 2 steps will be necessary.

    1. Rename your Database file.

    You can rename database to resolve this item using the following steps:
    • Shutdown NinjaTrader, and navigate to the Windows File Explorer (Windows Key + E)
    • Go to the Documents/NinjaTrader 8/db folder
    • Right-click on "NinjaTrader.sqlite" and rename it to "NinjaTrader OLD.sqlite"
    • Here is a reference video: https://app.screencast.com/ffpxQ063SjZq9


    When you restart NinjaTrader, a fresh database file will automatically be created by the software. You should then be able to connect and your Charts should be loading properly.
    • Unfortunately, the following items stored in the old database will be lost - custom Trading Hours templates, custom Instruments/Instrument Lists, historical trade execution data, and saved Strategy Analyzer backtest results
    • Locally added Sim accounts will be removed, Sim101 will be reset, and any strategies will need to be re-added to the Strategies tab


    To prevent running into situations where you can potentially lose important data, we advise running regular backups via the built-in Backup feature in NinjaTrader.


    2. To prevent this error in the future, if you have not yet done so, please update to the latest version (8.1.4.1) to implement system fixes.

    To update to the latest version of NinjaTrader Desktop please follow the steps below.
    • Login into the NinjaTrader Account Dashboard
    • Click "Download" in the bottom left-hand corner of the sidebar
    • Next select "Download" in the "Most Recent Release" Window in the main screen
    • Once the installation had downloaded, ensure any previous version of NinjaTrader is closed before running the installation package.


    After the installation package is completed you will be able to log into to the latest version of NinjaTrader Desktop with the connection guide linked below:

    Connecting in NinjaTrader Desktop

    Please let us know if we may be of any further assistance.​
    Erick P.NinjaTrader Customer Service

    Comment


      #3
      NinjaTrader_Erick

      Thank you for your response. After doing step one is there a scenerio where I can upload a backup file so I dont have to reset all of my charts? Or will the backup be useless because it has been tainted with the error?

      Comment


        #4
        Hello litamm89 ​,

        Thank you for your message.

        Replacing your database and updating would not reset all your charts.

        This process would have no affect on Charts , indicators, workspaces, nor templates.

        Only Data that is lost is: Trading Hours templates, custom Instruments/Instrument Lists, historical trade execution data, and saved Strategy Analyzer backtest results
        Locally added Sim accounts will be removed, Sim101 will be reset, and any strategies will need to be re-added to the Strategies tab.


        But if you want to make a backup file, I would suggest you make one, without checking the "Database" when you are asked what components you want to include in the file.

        I have attached the publicly available Help Guide section regarding backup and restore below:

        NinjaTrader Help Guide - Backup & Restore

        Please let us know if we can be of further assistance.​
        Erick P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        60 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        39 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        21 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        23 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        51 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X