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 fx.practic, 10-15-2013, 12:53 AM
        5 responses
        5,403 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by Shai Samuel, 07-02-2022, 02:46 PM
        4 responses
        94 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by DJ888, Yesterday, 10:57 PM
        0 responses
        6 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by MacDad, 02-25-2024, 11:48 PM
        7 responses
        158 views
        0 likes
        Last Post loganjarosz123  
        Started by Belfortbucks, Yesterday, 09:29 PM
        0 responses
        8 views
        0 likes
        Last Post Belfortbucks  
        Working...
        X