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

Save as function possible for Strategies?

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

    Save as function possible for Strategies?

    Is it possible, once you have devellopped a strategy as a kind of framework, to coppy the whole strategy and rename it. The objective is to use this copy as a start for a new strategy?

    #2
    Please try NinjaScript Editor->Right click->Save As

    Comment


      #3
      Originally posted by NinjaTrader_Dierk View Post
      Please try NinjaScript Editor->Right click->Save As
      Oh, I have forgotten to say that up till now I can only work with the strategy wizzard that has not such a function. So is there a possibillity to do this with Windows explorer?

      Comment


        #4
        I see. Unfortunately this is not supported.

        Comment


          #5
          Something to build in a new release?

          Originally posted by NinjaTrader_Dierk View Post
          I see. Unfortunately this is not supported.
          May be this is something to build in a new release?
          I will send some sugestions for the Strategy Wizard.

          Comment


            #6
            I've used Save-As in this manner many times, and I can attest that it works well (but only when editing NinjaScript code - either Indicators or Strategies.)

            When Save-As is run, in addition to creating a new file with a new name, it also changes name of the indicator throughout the file, which prevents errors that would result from having a redundant indicator/strategy name.

            However, it's possible that the [Description("whatever")] line doesn't have the indicator name in it, so it won't get changed. Since it's this description that gets displayed in the Indicators selection screen when adding indicators to a chart, it's wise to make sure that this name gets changed as well, as otherwise you will have an ambiguous situation where two different indicators display the same description in the Indicator selection screen.

            KBJ
            Last edited by KBJ; 10-22-2007, 01:45 PM.

            Comment


              #7
              Originally posted by Trader Rob View Post
              May be this is something to build in a new release?
              I will send some sugestions for the Strategy Wizard.
              Thanks for your suggestion. We'll add it to the list.

              Comment


                #8
                What you can do in the Wizard is save a condition set as a "Template". Right click in the wizard where your conditions are to see how this is done.
                RayNinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by KBJ View Post
                  I've used Save-As in this manner many times, and I can attest that it works well (but only when editing NinjaScript code - either Indicators or Strategies.)

                  When Save-As is run, in addition to creating a new file with a new name, it also changes name of the indicator throughout the file, which prevents errors that would result from having a redundant indicator/strategy name.

                  However, it's possible that the [Description("whatever")] line doesn't have the indicator name in it, so it won't get changed. Since it's this description that gets displayed in the Indicators selection screen when adding indicators to a chart, it's wise to make sure that this name gets changed as well, as otherwise you will have an ambiguous situation where two different indicators display the same description in the Indicator selection screen.

                  KBJ
                  I don't mind using the script editor for using of the Save As function. But once you unlock the code that is made with the Strategy Wizzard you can't use the wizard anymore to change/expand my strategy. And I want to stay within the abilities of the wizard.

                  Comment


                    #10
                    I know what you mean, Rob.

                    Has anyone suggested a feature whereby only portions of Wizard-generated code would be unlocked and could contain raw NinjaScript, while the rest could still be manipulated by the Wizard?

                    There are probably some complicated design issues that prevent that, but does the wizard allow specification of user specified subroutines? If user written methods could be used, this might accomplish much the same thing, by allowing the Wizard to handle the mundane, and localizing the complexities in another module (or perhaps a section of code in the same module that is marked in some way as "user modifiable".)

                    KBJ

                    Comment


                      #11
                      Unfortunately not. The wizard is limited although more advanced than others I have seen. For sure we can and will enhance it over time but right now there are things that just can't be accomodated for in the Wizard and one must move to the Editor if faced with a road block.
                      RayNinjaTrader Customer Service

                      Comment


                        #12
                        On the same track

                        Originally posted by KBJ View Post
                        I know what you mean, Rob.

                        Has anyone suggested a feature whereby only portions of Wizard-generated code would be unlocked and could contain raw NinjaScript, while the rest could still be manipulated by the Wizard?

                        There are probably some complicated design issues that prevent that, but does the wizard allow specification of user specified subroutines? If user written methods could be used, this might accomplish much the same thing, by allowing the Wizard to handle the mundane, and localizing the complexities in another module (or perhaps a section of code in the same module that is marked in some way as "user modifiable".)

                        KBJ
                        KBJ, we are on the same track of mind at this subject.

                        So here is the request for: a feature whereby only portions of Wizard-generated code would be unlocked and could contain raw NinjaScript, while the rest could still be manipulated by the Wizard!

                        This would create great possibillities to make some local changes in the code without being a C# programmer. For example it would give me a way to expand the amount of User Defined Inputs by copy and change those statements created by the wizard. Or to create If, Then, Else staments.
                        Etc, etc.

                        Comment


                          #13
                          Rob,

                          I think what Ray is saying, was also covered in my earlier post.

                          Specifically, "There are probably some complicated design issues that prevent that".

                          KBJ

                          Comment


                            #14
                            Originally posted by KBJ View Post
                            I've used Save-As in this manner many times, and I can attest that it works well (but only when editing NinjaScript code - either Indicators or Strategies.)

                            When Save-As is run, in addition to creating a new file with a new name, it also changes name of the indicator throughout the file, which prevents errors that would result from having a redundant indicator/strategy name.

                            However, it's possible that the [Description("whatever")] line doesn't have the indicator name in it, so it won't get changed. Since it's this description that gets displayed in the Indicators selection screen when adding indicators to a chart, it's wise to make sure that this name gets changed as well, as otherwise you will have an ambiguous situation where two different indicators display the same description in the Indicator selection screen.

                            KBJ
                            Correction:

                            Where, below, I referred to the [Description("whatever")] line, saying it "gets displayed in the Indicators selection screen when adding indicators to a chart", that is incorrect.

                            I meant to say that you should make sure the [Gui.Design.DisplayName("whatever")] line is unique, as this is what gets displayed in the list of Indicators.

                            Sorry for any confusion I may have caused.

                            KBJ

                            Comment


                              #15
                              I know this is a stale thread but just in case someone is seeking a simple work around for this here is what I do.

                              When I develop a strategy in the Wizard I save it with a name like...
                              StrategyWiz

                              Once I take it as far as I want to in the Wizard I make sure I have a saved build of my latest Wiz code then I again open it in the Wizard and simply change the name on the second window to...
                              StrategyCode

                              Or I drop the Code word completely and just use the name I intend for the final version.

                              I then click through the windows changing nothing else. I then open the Wizard one more time on my StrategyCode strategy and unlock the code.

                              Gains

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by adeelshahzad, Today, 03:54 AM
                              5 responses
                              32 views
                              0 likes
                              Last Post NinjaTrader_BrandonH  
                              Started by stafe, 04-15-2024, 08:34 PM
                              7 responses
                              31 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by merzo, 06-25-2023, 02:19 AM
                              10 responses
                              823 views
                              1 like
                              Last Post NinjaTrader_ChristopherJ  
                              Started by frankthearm, Today, 09:08 AM
                              5 responses
                              19 views
                              0 likes
                              Last Post NinjaTrader_Clayton  
                              Started by jeronymite, 04-12-2024, 04:26 PM
                              3 responses
                              43 views
                              0 likes
                              Last Post jeronymite  
                              Working...
                              X