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

Can I Copy an Existing Strategy?

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

    Can I Copy an Existing Strategy?

    Hi,

    I am creating different strategies in NT7 that are somewhat similar to each other. Is it possible to copy a strategy as another name so that I can modify the new one? I don't want to delete the old one.

    I know that I can copy and paste different parts of the strategy but not the User Input Variables. I can't seem to find anywhere that addresses this issue so I am assuming that it can not be done. Can someone tell me if it is possible to copy a strategy?

    Thanks
    LarryRay

    #2
    One way to do this is by:

    Create a new strategy and give it to name that you want.

    Open the strategy you want to copy.

    Ctrl-A to select all text in the file.

    Ctrl-C to copy it.

    Switch to the new strategy file you created.

    Crtl-A to select all text in that file.

    Ctrl-V to replace it with the copied text of the other strategy.

    Now you have to change the "Name=" field to the name of the new strategy.

    Code:
    if (State == State.SetDefaults)
                {
                    Description                                    = @"";
                    Name                                        = "NameOfNewStrategy";
    That works in NT 8. It probably works in NT7 too.

    Comment


      #3
      Thanks

      Thank you so much for giving clear instructions on how I can do this. I will give it a try.

      Comment


        #4
        It's been a while in NT7, but when editing - right click and "SAVE AS".

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by sidlercom80, 10-28-2023, 08:49 AM
        171 responses
        2,275 views
        0 likes
        Last Post QuantKey_Bruce  
        Started by Irukandji, Yesterday, 02:53 AM
        2 responses
        17 views
        0 likes
        Last Post Irukandji  
        Started by adeelshahzad, Today, 03:54 AM
        0 responses
        3 views
        0 likes
        Last Post adeelshahzad  
        Started by CortexZenUSA, Today, 12:53 AM
        0 responses
        3 views
        0 likes
        Last Post CortexZenUSA  
        Started by CortexZenUSA, Today, 12:46 AM
        0 responses
        1 view
        0 likes
        Last Post CortexZenUSA  
        Working...
        X