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

Git / Source Control Best Practices

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

    Git / Source Control Best Practices

    I would like to start a discussion regarding best practices for source control in developing for NinjaTrader. Currently, I am using source control with Git for this but not in a way that I think is ideal. Is there any guidance out there already on what works and what ways this works best?
    Bruce DeVault
    QuantKey Trading Vendor Services
    NinjaTrader Ecosystem Vendor - QuantKey

    #2
    HI Bruce,

    Yes, thank you.

    It would be great if Ninja could integrate Git .... but for me I would want the git libraries on my LAN

    Comment


      #3
      Yes, anything that uses Git should be interoperable if it's simple Git commands - could be GitHub - could be Azure - could be your own Git server - shouldn't matter.
      Bruce DeVault
      QuantKey Trading Vendor Services
      NinjaTrader Ecosystem Vendor - QuantKey

      Comment


        #4
        after a thought, I would just want a way to overwrite the original file without getting the Ninja Library confused...cause my code is just for my own use...

        every time I version anything or have new code the entire library is zipped with a time stamp and copied to my Proton Drive...is easy, and there are all the prior versions with timestamp

        so, all I really need is to do that...overwrite without confusing the Ninja Library

        Comment


          #5
          for code compare across versions, I use this

          Code Compare is an advanced file and folder comparison tool. Its intuitive interface allows you to merge differing files and folders fast and easily! And it's FREE!


          it works really well...

          the best way to open the two files for comparison is to have them in the same folder and open them at the same time with file manager

          Comment


            #6
            If at all possible I would like to keep this focused on source control e.g. Git or similar. Yes, I could zip up the directory a bunch of times, but that's not really source control per se. That's just a subset of the daily back up of each computer.
            Bruce DeVault
            QuantKey Trading Vendor Services
            NinjaTrader Ecosystem Vendor - QuantKey

            Comment


              #7
              For comparisons outside of source control, I use Beyond Compare. But source control is more than that - it gives you the whole history of a file with context and a lot more - who changed it, when it was changed, and what happened before that, when this file's evolution was forked and which other files were changed in the same commit, etc.
              Bruce DeVault
              QuantKey Trading Vendor Services
              NinjaTrader Ecosystem Vendor - QuantKey

              Comment


                #8
                Ok, yes, focus here on Source Control....I used to work in Corporate Software Development....but for my own use I don't need a formal version control. Though it is completely necessary for what you are doing...

                Comment


                  #9
                  Hello QuantKey_Bruce,

                  Just to chime in with a support answer, We have no best practice for using source control that is left up to the user. There is no built in source control features. If any users have best practices that they use they can share them here.
                  JesseNinjaTrader Customer Service

                  Comment


                    #10
                    Originally posted by QuantKey_Bruce View Post
                    For comparisons outside of source control, I use Beyond Compare. But source control is more than that - it gives you the whole history of a file with context and a lot more - who changed it, when it was changed, and what happened before that, when this file's evolution was forked and which other files were changed in the same commit, etc.
                    Just to complete this part of the discussion,
                    I use the open source WinMerge to merge
                    changes from a test version back to the original
                    version -- works great.

                    Comment


                      #11
                      Beyond Compare does this also - anytime you're looking at diffs you can simply click on an arrow pointing left or an arrow pointing right and it merges from one side to the other with the one click.
                      Bruce DeVault
                      QuantKey Trading Vendor Services
                      NinjaTrader Ecosystem Vendor - QuantKey

                      Comment


                        #12
                        I would like to reopen this discussion. There needs to be a way to integrate NinjaTrader-specific development with Git. I'm unconvinced that assuming everyone will develop without source control is a reasonable or even viable path forward. We all have our own practices, I am sure, for taking care of these things, but an integration with source control is really what is needed here. Anything else is not a real solution.
                        Bruce DeVault
                        QuantKey Trading Vendor Services
                        NinjaTrader Ecosystem Vendor - QuantKey

                        Comment


                          #13
                          I have been using Git for source control since I started development for NinjaTrader years ago. My repository is located in <Documents>\NinjaTrader 8\Bin. I have set it to ignore the files that NinjaTrader provides. I haven't had any issues with this approach. I have a development machine and a trading machine and a third repository that is used by both to push/pull changes. When I want to transfer changes to the trading machine I push then pull from the respective places. I also have a generated file that grabs the current commit revision. It is dumped to the NinjaTrader log to keep track of which revision is being used at any given point for the trading machine.

                          Comment


                            #14
                            ntbone One thing I'm trying to think through the best approach before I dive in is I would like to have several repos such that only certain indicators are in each one, but they're all in the same directory. It's easier if they're in different e.g. vendor directories, but sometimes they're necessarily all in Indicators. Each could .gitignore the others but then the .git files would be in the same directory and it seems very inelegant. It seems like the easiest path is to enforce that everything is in a directory and nothing is just in Indicators.
                            Bruce DeVault
                            QuantKey Trading Vendor Services
                            NinjaTrader Ecosystem Vendor - QuantKey

                            Comment


                              #15
                              I would suggest sub-folders inside the Indicators folder then. One for each collection of indicators you wish to use and the repositories are for each sub folder. I do not think Git allows you to have multiple repositories working in the same folder.

                              For me I have the bin folder as I have indicators, add-ons, drawing tools and a whole set of support files including the generated file I spoke of that tracks the git revision that is currently in use. Useful if I need to figure out what code I was using during a given trading session.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Karado58, 11-26-2012, 02:57 PM
                              8 responses
                              14,828 views
                              0 likes
                              Last Post Option Whisperer  
                              Started by Option Whisperer, Today, 09:05 AM
                              0 responses
                              1 view
                              0 likes
                              Last Post Option Whisperer  
                              Started by cre8able, Yesterday, 01:16 PM
                              3 responses
                              11 views
                              0 likes
                              Last Post cre8able  
                              Started by Harry, 05-02-2018, 01:54 PM
                              10 responses
                              3,204 views
                              0 likes
                              Last Post tharton3  
                              Started by ChartTourist, Today, 08:22 AM
                              0 responses
                              6 views
                              0 likes
                              Last Post ChartTourist  
                              Working...
                              X