Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Development environment vs. Production environment

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

    Development environment vs. Production environment

    Hi,

    I want to run my strategy for live trading, while at the same time continuing to enhance the strategy and the indicators that it uses, without affecting the production version.

    When working as a programmer, I would just have two different environments, which was easily created by creating a "development" folder and a "production" folder.
    In NT, has there been any discussion or ideas on how to do something like this, or is there a suggested practice?

    The best I've come up with so far is to copy and rename every script with a Dev or Prod tag, but this seems suboptimal. Does anyone have any better ideas?


    #2
    Hello bsmith,

    You can use two seperate installs but you can't run them at the same time. You would import the scripts you want to use as production into the clean install and use that when you want to use the production version. To change to the dev version you exit, rename the user folder and re open the platform.

    Use the following steps to make a clean user folder.

    1. Exit NinjaTrader
    2. Open the Documents folder
    3. Rename the NinjaTrader 8 folder to NinjaTrader 8 dev
    4. Download the installer from https://account.ninjatrader.com/download
    5. Install the platform, this will create a new user folder.
    6. Open the platform and import any of the items that you need

    To revert back to your previous data use the following steps.

    1. Exit NinjaTrader
    2. Open the Documents folder
    3. Rename the NinjaTrader 8 folder to NinjaTrader 8 prod
    4. Rename the NinjaTrader 8 dev folder to NinjaTrader 8

    NinjaTrader looks for the folder named NinjaTrader 8 for your user data.​

    Comment


      #3
      Thank you Jesse for the quick reply.

      Is it possible to run NT on two separate machines, and run both of them simultaneously?

      Comment


        #4
        Hello bsmith,

        Yes that is possible, it just cannot be running two instances on the same machine.

        Comment


          #5
          Originally posted by bsmith View Post
          Hi,

          I want to run my strategy for live trading, while at the same time continuing to enhance the strategy and the indicators that it uses, without affecting the production version.

          When working as a programmer, I would just have two different environments, which was easily created by creating a "development" folder and a "production" folder.
          In NT, has there been any discussion or ideas on how to do something like this, or is there a suggested practice?

          The best I've come up with so far is to copy and rename every script with a Dev or Prod tag, but this seems suboptimal. Does anyone have any better ideas?
          If you aren't using two different instances then a possible solution is to change the namespace. For example, one could be mystrategy and one could be mystrategydev. However, you'll have to manually copy the changes over to the production version and make sure the namespace is correct. Sometimes I do that if I'm just trying to test some things out. You just need to watchout for the auto import.

          What I usually do is just have the normal main or dev branch, copy it over and recompile depending if I'm trading or developing at the time. I also decouple as much as I can away from the NinjaScript namespace. The few files that do rely on NinjaScript namespace are partial classes broken into several files in the root directory. If you look at my project, I'm refactoring it into an event driven architecture with interfaces. This allows me to create better mocks for my code to test things I want. I'm able to write the tests I need outside of the NinjaTrader environment.

          This is an example of how I'm structuring my project in this dev branch. https://github.com/WaleeTheRobot/ord...s/OrderFlowBot

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          571 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          331 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          549 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          549 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X