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

Archiving Old Strategies

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

    Archiving Old Strategies

    How can I remove old strategies from the list without deleting them? I've tried moving them from bin\custom\strategies but they still show up in the list. How can I accomplish my goal?

    #2
    Hello Trader146,

    Thanks for your post.

    If you removed strategy files from the Documents\NinjaTrader 8\bin\Custom\Strategies folder, you would need to run a compile in the NinjaScript Editor window for those changes to take effect.

    Once you have removed the script from the folder and then run a compile, the strategies will no longer appear.

    Further, if you want you can simply exclude the scripts from compilation in the NinjaScript Editor (open New > NinjaScript Editor window, open Strategies folder, right-click on strategy, select 'Exclude from compilation'). This would prevent the NinjaScripts from compiling or appearing in the Strategies window when adding a strategy to a chart or to the Strategies tab of the Control Center.

    NinjaScript Editor help guide: https://ninjatrader.com/support/help...nt8/editor.htm
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      Thank You!

      Comment


        #4
        Ok, I have compiled the strategies and while they don't show up in the list in NinjaScript Editor, they still show up when adding a strategy to a chart. How do I prevent that?

        Comment


          #5
          Hello Trader146,

          Thanks for your notes.

          To clarify, did you exclude the strategies from compilation in the NinjaScript Editor window or did you delete the strategy file from the Documents\NinjaTrader 8\bin\Custom\Strategies folder?

          Have you closed the Strategies window and then re-opened the Strategies window to see if the changes have taken effect?

          If you restart NinjaTrader, open a New > Chart window, right-click on the chart, and select 'Strategies', do you see the strategies listed?

          Do you have multiple NinjaScript strategies with the same name as the ones removed or excluded from compilation?

          I look forward to assisting further.





          Brandon H.NinjaTrader Customer Service

          Comment


            #6
            I decided to make a video to show you what is happening. Please take a look. Hopefully you can help me resolve this.



            Thanks!

            Comment


              #7
              Hello Trader146,

              Thanks for that information.

              To clarify, are these custom strategies that you created? Or, are they strategies from a third-party developer?

              If they are strategies from a third-party developer, did the strategies come as an assembly (.dll)?

              Assembly files will not appear in the NinjaScript Editor window since the code is protected but the strategies would appear in the Strategies window.

              If these came as an assembly (.dll), if you go to Tools > Remove NinjaScript Assembly, do you see the assemblies listed on the 'Remove NinjaScript Assembly' window?

              If so, select the assemblies in the Remove NinjaScript Assembly window and select the 'Remove' button. Then, run a compile in the NinjaScript Editor window and check to see if the behavior persists.

              Please move the Archive folder outside of the Documents\NinjaTrader 8 folder. This could be placed in the Documents folder or the Desktop folder on your PC, for example.

              After moving the Archive folder outside of the Documents\NinjaTrader 8 folder, restart NinjaTrader, open a New > NinjaScript Editor window, and run a compile.

              Then, open a New > Chart window, select the 'Strategies' button, and note if the behavior persists.

              I look forward to assisting further.
              Brandon H.NinjaTrader Customer Service

              Comment


                #8
                All of the strategies are custom strategies I created myself, not vendor assemblies. BTW, I got instructions elsewhere to delete the cache folder and that didn't help either. I also temporarily renamed the strategyanalyzerlogs folder as it contained copies of the .cs files, but that had no affect either. This is such a strange problem. Please help!

                Comment


                  #9
                  OK, they are gone. ChatGPT walked me through the following steps and they worked. Forgive me if you told me to do this before. I thought I was doing it when I selected compile from the upper menu, but apparently that does do the trick.

                  Click image for larger version

Name:	image.png
Views:	31
Size:	79.3 KB
ID:	1288775

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by burtoninlondon, Today, 12:38 AM
                  0 responses
                  5 views
                  0 likes
                  Last Post burtoninlondon  
                  Started by AaronKoRn, Yesterday, 09:49 PM
                  0 responses
                  12 views
                  0 likes
                  Last Post AaronKoRn  
                  Started by carnitron, Yesterday, 08:42 PM
                  0 responses
                  11 views
                  0 likes
                  Last Post carnitron  
                  Started by strategist007, Yesterday, 07:51 PM
                  0 responses
                  13 views
                  0 likes
                  Last Post strategist007  
                  Started by StockTrader88, 03-06-2021, 08:58 AM
                  44 responses
                  3,982 views
                  3 likes
                  Last Post jhudas88  
                  Working...
                  X