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

Optimization Fitnesses

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

    Optimization Fitnesses

    There are several OFs. I just use one or two of them, plus my own. I'd like to reduce that list to just those that I use (eg, who really uses "MaxSharpeRatio"?). I tried moving them to a different folder, but all hell broke loose (do NOT try this; moving them back didn't work, and I couldn't even uninstall NT). So, do you have any suggestions as to how that list can be trimmed? That is, it's possible to easily move files in and out of the "Strategies" folder, why not this one?

    #2
    Hello spottysallrite,

    To remove an open source optimization fitness script:
    • Click New -> NinjaScript Editor -> select to expand the Optimization Fitness folder
    • Right-click the strategy by name -> select Remove
    To Exclude an open source script from compilation:​We do not recommend manually adding, removing, or moving files in the filesystem as this will likely cause compile errors.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Well, what's the proper way to move files back into the user files (eg, Strategies, Indicators, etc) ? I'm used to just pasting them in. Seems that Windows 11 doesn't like that.

      Comment


        #4
        Hello spottysallrite,

        We do not suggest that you add, remove, or move any files in the Documents\NinjaTrader 8 folder as this likely cause compile errors.

        To import a NinjaScript into NinjaTrader 8 do the following:
        1. Download the script to your desktop, keep it in the compressed .zip file.
        2. From the Control Center window select Tools -> Import -> NinjaScript...
        3. Click the Desktop icon on the left to navigate to the desktop
        4. Select the downloaded .zip file -> then click Open
        5. NinjaTrader will then confirm if the import has been successful.
        Critical *Note that on any files that say "File already exists on your PC" that start with an "@" symbol are the ones that came preloaded inside of NinjaTrader so you would say "No" so that you do not override those files.

        Below is a link to the help guide on importing NinjaScripts.
        https://ninjatrader.com/support/help...-us/import.htm


        To remove a third party assembly package:To remove open source indicators:To remove an open source strategy:
        • Click New -> NinjaScript Editor -> select to expand the Strategies folder
        • Right-click the strategy by name -> select Remove
        To Exclude an open source script from compilation:
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Ok, I tried that (ie, created a ZIP file from one of my strategy scripts. Then went to Tools -> Import -> NinjaScript... Then selected that ZIP file.) The result was the following error, "Selected file was made from an older, incompatible version of NinjaTrader or is not a NinjaScript archive". As such, the file was not imported. I'm using NT 8, so what's the problem?

          Comment


            #6
            Hello spottysallrite,

            The file may have been exported from an older version of NinjaTrader.

            From time to time there are code changes in NinjaScript that require re-exporting (and may require changes to the script code).

            Please ensure you are on the latest release of NinjaTrader 8.1.1.7.


            If this is from a 3rd party, please report the error to the 3rd party and have the author re-export the script using the latest release of NinjaTrader 8.1.1.7.


            Note, that a script has to be exported from NinjaTrader to be able to be imported into NinjaTrader. Just putting files in a zip file will not work as that would not be an importable NinjaScript export.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Well, I have literally hundreds of strategy scripts that have not been exported, just simply moved out of the "Strategy" folder to another folder. In the past I was able to move those seamlessly from the NT folder to my folder and back, as desired (on Windows 10). I do this because I often need to look at prior code. Are you saying drag and drop is now obsolete, and those numerous files are no longer accessible?

              Comment


                #8
                Hello spottysallrite,

                Our support team has always recommended not manually move, add, or remove files from the filesystem as this most often leads to compile errors.

                We recommend that you export the NinjaScript, and this can be re-imported later, or to export a backup file which can contain all NinjaScripts.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Ok, so if I created a script in Visual Studio there is no way to get it into NT?

                  Comment


                    #10
                    Hello spottysallrite,

                    We advise that you create the script using the NinjaScript Editor, which will also create the framework as well as the overload wrappers properly, and then once created you can edit the script in a 3rd party editor. Just save the script with the NinjaScript Editor open and NinjaTrader will detect the changes and will automatically trigger a compile.
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      So, every time I want to move a script off NT I have to zip it first? I've got hundreds of them. That isn't practical.

                      Comment


                        #12
                        Hello spottysallrite,

                        You can export all of you custom open source scripts in one export if you wanted to.

                        You can make a backup that contains all ninjascripts and only ninjascripts.
                        Chelsea B.NinjaTrader Customer Service

                        Comment


                          #13
                          I guess I'm not following. If I created a backup of only ninjascripts, then how would I then access one particular strategy?

                          Comment


                            #14
                            Hello spottysallrite,

                            You would have to reimport the backup which would reimport all of them.

                            This would be the alternative to exporting each one as an importable NinjaScript export.
                            Chelsea B.NinjaTrader Customer Service

                            Comment


                              #15
                              Ok, I tried "Remove" on one of the NT scripts. That produced the following error message, "You cannot delete a system Optimization Fitness." Well, that's was my initial question here was clearly about.

                              So, Chelsea, why did you give me the runaround on this? Why couldn't you just tell me this instead of misdirecting me and wasting my time?

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Jonafare, 12-06-2012, 03:48 PM
                              5 responses
                              3,986 views
                              0 likes
                              Last Post rene69851  
                              Started by Fitspressorest, Today, 01:38 PM
                              0 responses
                              2 views
                              0 likes
                              Last Post Fitspressorest  
                              Started by Jonker, Today, 01:19 PM
                              0 responses
                              2 views
                              0 likes
                              Last Post Jonker
                              by Jonker
                               
                              Started by futtrader, Today, 01:16 PM
                              0 responses
                              8 views
                              0 likes
                              Last Post futtrader  
                              Started by Segwin, 05-07-2018, 02:15 PM
                              14 responses
                              1,792 views
                              0 likes
                              Last Post aligator  
                              Working...
                              X