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 pmachiraju, 11-01-2023, 04:46 AM
        8 responses
        149 views
        0 likes
        Last Post rehmans
        by rehmans
         
        Started by mattbsea, Today, 05:44 PM
        0 responses
        5 views
        0 likes
        Last Post mattbsea  
        Started by RideMe, 04-07-2024, 04:54 PM
        6 responses
        33 views
        0 likes
        Last Post RideMe
        by RideMe
         
        Started by tkaboris, Today, 05:13 PM
        0 responses
        5 views
        0 likes
        Last Post tkaboris  
        Started by GussJ, 03-04-2020, 03:11 PM
        16 responses
        3,283 views
        0 likes
        Last Post Leafcutter  
        Working...
        X