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 Jltarrau, Today, 05:57 AM
        0 responses
        1 view
        0 likes
        Last Post Jltarrau  
        Started by f.saeidi, Today, 05:56 AM
        1 response
        2 views
        0 likes
        Last Post Jltarrau  
        Started by Stanfillirenfro, Yesterday, 09:19 AM
        7 responses
        51 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by TraderCro, 04-12-2024, 11:36 AM
        4 responses
        70 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Mindset, Yesterday, 02:04 AM
        1 response
        15 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X