Resolving NinjaTrader Issues with OneDrive

NinjaTrader should not be used with OneDrive as you may encounter file access violations or other issues when OneDrive attempts to sync files to the cloud. Additionally, we do not recommend deleting the bar cache unless instructed by a support technician for troubleshooting.
Follow these steps to unlink OneDrive, move your files, and perform a “soft reinstall” of NinjaTrader Desktop:
Step 1: Unlink OneDrive and Stop Backup
- Completely close NinjaTrader.
- Unlink OneDrive Backup:
- Hover over the OneDrive cloud icon in the system tray (bottom-right corner).
- Right-click the icon and select Settings.
- Go to the Backup tab.
- Under Documents, click Stop backup.
Step 2: Move NinjaTrader 8 Files to Local Drive
- Open File Explorer and navigate to your Documents folder.
- Open OneDrive Documents Folder:
- Right-click the “Where are my files” icon and select Open in new window.
- Locate NinjaTrader 8 Folder:
- Find the NinjaTrader 8 folder in your OneDrive Documents location.
- Copy Files:
- Copy the entire NinjaTrader 8 folder.
- Paste Files to Local Drive:
- Open a second window to your local Documents folder.
- Paste the NinjaTrader 8 folder into your local Documents folder.
Step 3: Soft Reinstall NinjaTrader Desktop
- Uninstall NinjaTrader:
- Press the Windows key and type Control Panel in the search bar.
- Open Control Panel > Programs > Programs and Features.
- Find NinjaTrader, right-click on it, and select Uninstall.
- Reinstall NinjaTrader:
- Go to the NinjaTrader Download Page.
- Log in to your account.
- Scroll down and click Download.
- Once downloaded, run the installer.
Step 4: Clear Any Lingering OneDrive Files
- Rename the ‘bin’ Folder:
- Navigate to Documents > NinjaTrader 8.
- Rename the bin folder (e.g., add “_old” at the end).
- Repair NinjaTrader:
- Go back to Control Panel > Programs > Programs and Features.
- Find NinjaTrader, right-click, and select Repair.
- This will remove any leftover OneDrive files and clear compile errors.
Step 5: Reimport Third-Party Items
- After completing the repair, you may need to reimport third-party items (such as indicators and strategies) one by one into NinjaTrader.
Conclusion
Once you’ve completed these steps, NinjaTrader should function without issues related to OneDrive. Your files will be safely moved to your local hard drive, and any lingering errors should be resolved.
How to tell whether OneDrive is the problem
Open File Explorer and go to your Documents folder. If the address bar shows a path containing OneDrive, such as C:\Users\YourName\OneDrive\Documents, your NinjaTrader 8 folder is being synced. Typical symptoms are errors that a file is in use or access is denied, NinjaScript compile errors that appear after a restart, and settings or workspaces that do not save.
Keeping it from coming back
After you stop the Documents backup, check the OneDrive backup settings again after major Windows updates or when you sign in on a new computer, since Documents backup can be offered again. Keeping NinjaTrader’s folder out of any cloud-synced location is the simplest rule; back it up with NinjaTrader’s own Tools > Export > Backup File instead.
Still seeing errors after these steps? Send us the exact message from the Log tab in the NinjaTrader Control Center through the chat, and we will help you find which file is still affected.
Discussion
1 comment- PSPeter S.✓ Verified customer
That is exactly what I did, before I read this. OneDrive is a curse.