Reloading strategy files (.cs)

I’ve had to scrap the former installatio folder and install a fresh NT.

I’ve copied the .cs files to
C:\Program Files\NinjaTrader 8\bin\Custom\Strategies

I’ve done the compile, none show up.

I’ve created a new strategy and copy/pasted to the new strategy. However, the new strategy doesn’t show up either. I looked in the Strategies folder and it’s not there.

Where are the strategy files stored?

Thanks!

Solved it. NT for some reason does not store the .cs file where it should. Rather, for me at least it stores the .cs files in my user folder.

C:\Users\User Name\Documents\NinjaTrader 8\bin\Custom\Strategies\mycustomstrategy.cs

Why is that? How can I change the storage location?

That is the standard location. It’s hard coded and can’t be changed. Storing user documents (ie your custom code files) in the Program Files directory is bad form. Changing files in that folder requires admin permissions and keeping things in the user’s documents allows potential other users to have their own custom files as well.

2 Likes

You’re absolutely right! I really should drop back to regular user mode. Better security.

For me it’s in Documents/NinjaTrader 8/bin/Custom/Strategies/.
Indicators are in their own folder in Custom/Indicators/

Sorry. Didn’t refresh and notice you solved it already.

Also keeping the installation files and user files separate has the advantage that you can install/uninstall/re-install/upgrade the application without messing with user files each time. Each installation will point to the user area and work as intended.

2 Likes