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

Rename Strategy

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

    Rename Strategy

    How can I rename a strategy?

    In my Strategy Analyzer I have a "MyCustomStrategy" I want to give a new name. I see no functions either there or in the Strategy Editor whereby I can do that.

    #2
    Hello dbooksta,

    Thank you for your post.

    The rename options is available in the first page of the Strategy Wizard.

    If this is greyed out and not available you can click the View Code button on the wizard.

    Right click in the code editor and select Save As...

    Give the file a new name

    While this will create a new file exactly the same as this one, it will rename the correct code requirements than by just changing the file name in the Documents folder.

    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Greetings!

      How would this be done in NT 8? There is no more Strategy Wizard, as far as I can see.

      I renamed a strategy while editing in Visual Studio 2019. However, when I open the Strategy Analyzer, I only see the previous name listed in the Strategy dropdown.

      Thanks.


      Originally posted by NinjaTrader_CalH View Post
      Hello dbooksta,
      Thank you for your post.

      The rename options is available in the first page of the Strategy Wizard.

      If this is greyed out and not available you can click the View Code button on the wizard.

      Right click in the code editor and select Save As...

      Give the file a new name

      While this will create a new file exactly the same as this one, it will rename the correct code requirements than by just changing the file name in the Documents folder.

      Let me know if I can be of further assistance.

      Comment


        #4
        Hi rgoudie,
        1) StrategyBuilder
        Only Strategies created with the wizard, called "StrategyBuilder" in NT8, can be edited using the StrategyBuilder (SB). Once their code is unlocked, you can't use the SB anymore for them, which is why these strategies don't show up in the SB picker anymore. You might want to create a copy and only then unlock that copy. This allows you to use both worlds in parallel, yet separate. To create a copy, you can just use "save as".
        Step 1: In the Control Panel Click -> New -> StrategyBuilder.
        Step 2: On the "Welcome = Create New Strategy" tab (@Ninja: "Create / Edit Strategy" would be less misleading) -> Select your strategy by hovering with your mose over it -> Don't open it.
        Step 3: Instead, click "save as", give it a new distinct name and off you go.

        2) NinjaScript Editor
        I'm not aware of a "save as" functionality to create a copy, (@Ninja: Would be cool)
        Ninja IS already cool (see below tip from Chris). Thx.

        NT-Roland

        P.S.: Applies to NT8. Posted in the NT7 section b/c the question was raised there.
        Last edited by NT-Roland; 05-05-2020, 05:11 PM. Reason: Deleted my manual work around because there is a much smarter way - see below post from Chris.

        Comment


          #5
          Hi rgoudie, thanks for your question.

          In the strategy builder, to make a copy of an existing script change the name in the General tab.

          To make a copy of a script from the NinjaScript editor open up the script you want to copy>Right click>Save As... then give the new script a different name. All class names will also be changed so it's more convenient than manually copying. The "Name" property of a script is what will show up in the Strategy menu and Strategy Analyzer.

          Please let me know if I can assist any further.
          Chris L.NinjaTrader Customer Service

          Comment


            #6
            I thank you both for your replies. I will use your suggestions.


            Originally posted by NinjaTrader_ChrisL View Post
            Hi rgoudie, thanks for your question.

            In the strategy builder, to make a copy of an existing script change the name in the General tab.

            To make a copy of a script from the NinjaScript editor open up the script you want to copy>Right click>Save As... then give the new script a different name. All class names will also be changed so it's more convenient than manually copying. The "Name" property of a script is what will show up in the Strategy menu and Strategy Analyzer.

            Please let me know if I can assist any further.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by ghoul, Today, 06:02 PM
            2 responses
            12 views
            0 likes
            Last Post ghoul
            by ghoul
             
            Started by jeronymite, 04-12-2024, 04:26 PM
            3 responses
            44 views
            0 likes
            Last Post jeronymite  
            Started by Barry Milan, Yesterday, 10:35 PM
            7 responses
            20 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by AttiM, 02-14-2024, 05:20 PM
            10 responses
            180 views
            0 likes
            Last Post jeronymite  
            Started by DanielSanMartin, Yesterday, 02:37 PM
            2 responses
            13 views
            0 likes
            Last Post DanielSanMartin  
            Working...
            X