Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT Throws Exception, Terminates When Creating or Deleting Script

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

    NT Throws Exception, Terminates When Creating or Deleting Script

    In the NT Editor, when I save (create Save As..) or delete (delete existing) a script file, NT throws an exception and terminates. The script does get saved intact, or deleted, respectively.


    After this happens​. Right clicking a chart shows Indicators... and Strategies... disabled. I have to recreate from scratch.

    I tried deleting all my workspaces and restoring them from backup. Then I tried a Repair Install. Neither helped. See attached image.
    Attached Files

    #2
    Hello gbourque,

    Thanks for your post.

    This error indicates that there is a corrupted XML file within the platform somewhere. Since there are a number of different types of XML files that are used in NinjaTrader, it's important to test and figure out exactly where the issue is coming from. More often than not, it's likely coming from a corrupt workspace but that is not always the case.

    Please perform each test below and once NinjaTrader has opened like Normal as expected, you have found where the file is located.

    Start with the First test and work your way down. Once NinjaTrader opens as expected, you do not need to perform any other steps beneath that point.

    Test Core NinjaTrader files:

    Please close NinjaTrader and then hold the Ctrl key on your keyboard and click to open NinjaTrader. Keep the Ctrl key held down until you see the splash screen show "Safe mode".
    • If NinjaTrader opened in Safe Mode, this lets us know the Core files are okay and it is something else.
    • If NinjaTrader will not open in Safe Mode, you will want to uninstall and then reinstall NinjaTrader

    Test the Workspace files:

    If NinjaTrader opened in Safe mode, Close the platform and then perform the steps below before reopening:
    • Go to the Documents Folder > NinjaTrader 8 > workspaces folder, Click and drag the "workspaces" folder to your Desktop and drop it there
    • Open NinjaTrader like normal now without holding the Ctrl key
    • Does the Platform open?
      • If Yes, this means the Workspace that NinjaTrader was trying to open to was corrupted and you will need to delete it
        • That doesn't mean all of the Workspaces are corrupted.
        • You could manually drag the Workspace files from where they are at on the desktop back to their original location within the Documents > NinjaTrader 8 > workspaces folder
      • If No, this means the corruption lies elsewhere


    Test the Database file:
    • If NinjaTrader didn't open after moving the Workspace files, you can move that whole folder back to put the Workspaces back
    • Now, go to the Documents Folder > NinjaTrader 8 > db > NinjaTrader.sdf
    • Drag the "NinjaTrader.sdf" file to your Desktop and drop it there
    • Try to open NinjaTrader like Normal again. Does it open?
      • If Yes, this means the Database file was corrupted and you will need continue using the new one that was just made
      • If No, this means the corruption lies elsewhere


    Test the Config file:
    • If NinjaTrader didn't open after moving the Database file, you can move that back to put the trade history back
    • Now, go to the Documents Folder > NinjaTrader 8 > config.xml
    • Drag the "confix.xml" file to your Desktop and drop it there
    • Try to open NinjaTrader like Normal again. Does it open?
      • If Yes, this means the Config file was corrupted and you will need to continue using the new one and re-enter your License Key and Connection information
      • If No, please let us know so we may provide further steps and information

    Once you have NinjaTrader up and running again, I strongly advise you to make backup files regularly to avoid losing information should this occur in the future:Feel free to always contact NinjaTrader's Platform Support team via email at PlatformSupport(at)ninjatrader(dot)com should you experience an issue performing any of these tests.​
    ​​
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      NT always opens for me. That's not the issue. Like I said, the error happens only when I try to use Save As.. or Remove... in the Script Editor. So I'm not sure how these instructions help.

      Comment


        #4
        Hello gbourque,

        Thanks for your notes.

        Please create a clean environment by following the steps below and test creating a copy of the SMA indicator to see if the behavior persists.

        Creating a clean environment can be done by following the steps below:
        1. Close NinjaTrader 8, and rename the "NinjaTrader 8" folder in My Documents to something like: "NinjaTrader 8 OLD"
        2. Uninstall NinjaTrader from the Windows Control Panel and reinstall using the installer from account.ninjatrader.com
        3. Add the required indicators and test the template.

        If you ever need to switch back to your original platform, you may do so by closing NinjaTrader and swapping the platform folder names.

        For example, Close NinjaTrader and rename the new "NinjaTrader 8" folder to "NinjaTrader 8 NEW" and the "NinjaTrader 8 OLD" folder to "NinjaTrader 8." Then restart the platform. Simply put: NinjaTrader 8 will always load the "NinjaTrader 8" folder in My Documents.​
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment


          #5
          The ooooold reinstall technique. Yes, I was about to resort to that myself. No big deal. Everything is backed up.

          Comment


            #6
            The reinstall did fix the problem. Thanks.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            68 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            41 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            24 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            27 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            54 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X