Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unexpected Compiling errors - on previously working strategy

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

    Unexpected Compiling errors - on previously working strategy

    Upon compiling(and before making any new changes to code) I received a large amount of errors. I was thinking it may be some sort of a database issue. I was seeing a few duplicated strategies, but not all strategies were duplicated. Click image for larger version

Name:	Screenshot 2024-02-05 081600.png
Views:	200
Size:	95.2 KB
ID:	1289870 Previously this strategy had been compiled error free. I've deleted the duplicated strategies and tried to recompile, but still getting errors.

    Do I need to do a DB repair? I've experienced some OneDrive sync issues recently, and was curious if this was related. Will this cause me to lose my strategies that are currently saved?

    I get no error messages when just opening NT8.


    #2
    RISKYBUSINEZZ,

    Thank you for writing in.

    This does appear to be related to OneDrive and it is ultimately an issue of duplicated NinjaScript files on your PC. Deleting the duplicated strategies was a good place to start, though it seems like the scripts in your screenshot are different types such as BarTypes, ChartStyles, DrawingTools, etc. Even after deleting any duplicates, this can happen again if OneDrive is still backing up your Documents folder. To resolve this issue, please move your Documents folder to your local hard drive on your PC using the following instructions:
    • Completely close NinjaTrader
    • Hover your mouse over the OneDrive icon (the cloud) in the App Tray
    • Right-click and select Settings
    • Locate the 'Backup' tab
    • Under the 'Documents' Folder, select 'Stop backup'
    After stopping the backup, you will need to copy the NinjaTrader 8 folder from the original OneDrive Documents location onto the local PC.
    • Go to your Documents folder
    • Locate the 'Where are my files' icon
    • Right-click and select 'Open in new window'
    • Locate the NinjaTrader 8 folder from within the OneDrive location
    • Copy and paste the entire NinjaTrader 8 folder into the documents folder on your local hard drive
    It is best to have one window open with the OneDrive documents location and one window open with the local PC documents location to achieve this.

    Once you have moved all of the NinjaTrader 8 files over, you will need to do a 'soft reinstall of NinjaTrader Desktop.
    • In the search field on your Windows taskbar, type Control Panel and select this app
    • Select Programs > Programs and Features
    • Locate NinjaTrader in the list, right-click, and select uninstall
    Once these steps are completed, download and install NinjaTrader Desktop by logging in to your user dashboard with the following link:



    You asked, "Will this cause me to lose my strategies that are currently saved?" No, this will not cause you to lose your strategies that are currently saved. A DB repair is likely not required and the only files you should delete are duplicates, meaning the strategies that you have currently saved will persist and not be deleted or lost.
    After the soft reinstall, please check the following folders and delete any files that appear to be duplicated:
    • Documents\NinjaTrader 8\bin\Custom\BarsTypes
    • Documents\NinjaTrader 8\bin\Custom\ChartStyles
    • Documents\NinjaTrader 8\bin\Custom\DrawingTools
    • Documents\NinjaTrader 8\bin\Custom\Indicators
    • Documents\NinjaTrader 8\bin\Custom\MarketAnalyzerColumns
    • Documents\NinjaTrader 8\bin\Custom\Strategies
    Once you have gone through and deleted any duplicated files, launch NinjaTrader then open a Control Center > New > NinjaScript Editor window. Press F5 to compile and check for any additional errors. If any appear, please feel free to post an updated screenshot here.

    Please let us know if we may be of further assistance.

    Comment


      #3
      I'm just saying this process is pretty ridiculous. I appreciate the tip, all the same. Will this mean that one drive cannot back up my NT8 files?

      Comment


        #4
        Originally posted by RISKYBUSINEZZ View Post
        I'm just saying this process is pretty ridiculous. I appreciate the tip, all the same. Will this mean that one drive cannot back up my NT8 files?
        OneDrive, as well as some other auto backup and antivirus programs, is known to interfere with the operation of NinjaTrader. We suggest scheduling backups and any file scans to times when you are not using NinjaTrader, as they can create file access conflicts if NinjaTrader is open and attempting to use a file at the same time another program is attempting to backup/scan the same file. Additionally, OneDrive is known to erroneously create copies of NinjaTrader files that can cause conflicts with the platform's basic functionality and ability to read those files/copies. Ultimately, to prevent these issues, you must stop OneDrive from backing up your Documents folder. NinjaTrader has its own backup/restore function for creating and restoring backup files.

        To create a backup, go to the Control Center > Tools > Export > Backup File window. Additional information about backups may be read in our Help Guide linked below.
        We recommend keeping this backup file on an external hard drive or uploaded to a cloud drive such as Google Drive or OneDrive in case your computer's internal hard drive becomes unusable.

        NinjaTrader Help Guide - Backup & Restore

        Please feel free to reach out with any additional questions or concerns.

        Comment


          #5
          Just a note to anyone who follows this up. I also went to one drive and completely deleted all the database information cache and then searched for anything with the extension .copy and removed it. I haven't had any additional compiling errors since then. What happened is that one drive will sync up all your files it identifies as coming from a source like a computer 'A' and Computer 'B'. In my case I had to wipe out this computer and reinstall all programs, which caused me to have duplicate files in one drive, I had to disable one drive snyc's temporarily until I found this fix. Now my one drive is able to sync and compilation is not a problem.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          56 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          132 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          73 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          45 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          49 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X