Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Best/Right way of creating a copy of an existing unlocked strategy

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

    Best/Right way of creating a copy of an existing unlocked strategy

    Hi Support,

    What is the best or right way for creating a copy of a strategy after it is unlocked? I want to build on previous versions of a strategy but want to keep the older versions.

    - I have a base strategy that is locked. Call it basestrat
    - I create a copy through strategy builder, call it basestratV1 -> unlock it and do my updates there. No issues

    How do I create a copy of basestratV1?

    If I create a new C# file (basestratV2) in the ninjatrader custom prj and copy the content of basestratV1, change the class name to basestratV2, it works and compiles. I also see the two strategies listed in the script editor (basestrratV1 and basestratV2). However, Strategy Analyzer will show two of basestratV1 (although I renamed the strat class name to basestratV2).

    Am I missing renaming something or is there a better way of doing it?

    Thanks,
    -Alaa
    -

    #2
    Hello aelagha,

    Thank you for your post.

    For unlocked strategies in the NinjaScript Editor, you'll also want to ensure you change the Name in State.SetDefaults - If you don't, you'll get two strategies that show up with the same name in the Strategy selections.

    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Ah, I missed that one. I will give it a try. Thank you.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by FrancisMorro, Today, 03:24 AM
      0 responses
      1 view
      0 likes
      Last Post FrancisMorro  
      Started by Segwin, 05-07-2018, 02:15 PM
      10 responses
      1,770 views
      0 likes
      Last Post Leafcutter  
      Started by Rapine Heihei, 04-23-2024, 07:51 PM
      2 responses
      31 views
      0 likes
      Last Post Max238
      by Max238
       
      Started by Shansen, 08-30-2019, 10:18 PM
      24 responses
      944 views
      0 likes
      Last Post spwizard  
      Started by Max238, Today, 01:28 AM
      0 responses
      11 views
      0 likes
      Last Post Max238
      by Max238
       
      Working...
      X