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!
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
NinjaTrader
Git / Source Control Best Practices
Collapse
X
-
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?Tags: None
- Likes 1
-
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
-
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
-
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.
Comment
-
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
-
Originally posted by QuantKey_Bruce View PostFor 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.
I use the open source WinMerge to merge
changes from a test version back to the original
version -- works great.
Comment
-
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.
- Likes 1
Comment
-
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.
- Likes 1
Comment
-
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.
Comment
-
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 Today, 09:09 AM | ||
Started by Option Whisperer, Today, 09:05 AM
|
0 responses
1 view
0 likes
|
Last Post Today, 09:05 AM | ||
Started by cre8able, Yesterday, 01:16 PM
|
3 responses
11 views
0 likes
|
Last Post
by cre8able
Today, 08:28 AM
|
||
Started by Harry, 05-02-2018, 01:54 PM
|
10 responses
3,204 views
0 likes
|
Last Post
by tharton3
Today, 08:52 AM
|
||
Started by ChartTourist, Today, 08:22 AM
|
0 responses
6 views
0 likes
|
Last Post
by ChartTourist
Today, 08:22 AM
|
Comment