Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Restoring from backup not loading ninjascript

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

    Restoring from backup not loading ninjascript

    Hi, I just tried to reload a number of strategies from the backup file and it's telling me files not restored as they will corrupt the installation.
    Is this expected?
    How do I backup the strategies and indicators in a way that works?
    Thanks.

    #2
    Hello Stem1 and thank you for your question.

    This warning exists because importing NinjaScript files can sometimes cause compile errors, especially if you do not have references to library (.dll) files in your Config file for your C# files (.cs) .

    I would like to stress that the safest option is always to reinstall your custom NinjaScript files from fresh copies using File -> Utilities -> Import NinjaScript. The below method is for advanced or "power" users who understand the responsibilities that come with modifying NinjaTrader's internals.

    NinjaTrader Backup files (ntbk) are really zip files. Provided you understand that importing your NinjaScript files may put you in a dirty compile state, you can follow these instructions.

    • While holding down the windows key (to the left of the space bar), press the letter r
    • type in
      cmd
      and press enter
    • in the shell window that comes up, type in
      cd "%UserProfile%\Documents\NinjaTrader Backup"
      and press enter
    • type in
      move <yourbackup>.ntbk <yourbackup>.zip
      replacing each <yourbackup> as appropriate, and press enter
    • In your Windows filesystem, navigate to your backup, and open its bin\Custom folder
    • Copy files from here to your (My) Documents\NinjaTrader 7\bin\Custom folder
    • Open NinjaTrader
    • From the Control Center select the Tools menu--> select the Edit NinjaScript menu item--> select Indicator
    • Select any indicator and double click on it (we need only to open and compile one script to see all compile errors for all files).
    • A new window will appear and you will need to right click in the window and select Compile to compile the indicators.
    • At the bottom of the window a new section will appear where you can find the error locations.

    Should you have compile errors at this point, it may be that you need to right-click in the editor window, select references, and add in any reference libraries in your (My) Documents\NinjaTrader 7\bin\Custom folder except the NinjaTrader.Custom.dll file or libraries that have x86 or x64 in them.


    Should this not resolve your compile errors, please let us know so we can assist further, a remote support session may be needed at this point.
    Jessica P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by kevinenergy, 02-17-2023, 12:42 PM
    117 responses
    2,766 views
    1 like
    Last Post jculp
    by jculp
     
    Started by Mongo, Today, 11:05 AM
    5 responses
    15 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by SightCareAubetter, Today, 12:55 PM
    0 responses
    3 views
    0 likes
    Last Post SightCareAubetter  
    Started by traderqz, Today, 12:06 AM
    8 responses
    16 views
    0 likes
    Last Post traderqz  
    Started by SightCareAubetter, Today, 12:50 PM
    0 responses
    2 views
    0 likes
    Last Post SightCareAubetter  
    Working...
    X