I don't like it any better for an editor either, but I followed the instructions in this thread and got it working for editing just fine. My real goal was to use the debugger, and I still had no source-level debugging capability, I'd appreciate more information on how you pull that off!
Debugging in VS. Very easy and I don't see how it can be done without VS.
I write only strategies, so my explanation is for them. (Don't understand people who write indicators. Why?)
1. Open source code in NT.
2. Right click and check the box to allow debug mode. You need to do it only once and from now on you we be in debug mode.
3. Open VS and open the cs file in it too.
4. In NT compile the code. Very important!! Each time after you load VS and cs file go back to NT and compile it. This creates some kind of linkage.
5. In VS in debug menu choose "attach to..." and pick NT from the list of processes.
6. On left margin of code in VS click on the row you want to break on. It will add a dot and in runtime it will stop there. One click on the dot and it will remove the break.
7. Run back test in NT and you will be stooped at the break you put in VS. F5 - continue. F10 - step.
Now you can take any variable and move it to watch window and you will see its value on each interaction.
When you find a bug stop debugging in VS. Correct it in NT. Recompile and run again.
I write it from memory so I hope the explanation is complete.
The following 10 users say Thank You to baruchs for this post:
Task List: View > Task List. You can drop reminders in your code such as //TODO: Check for divide by zero, and when you view your task list you will see them there for all the code in your Project. You can add custom items on the task list (BUILD_VER is one I made, for example) using the Tool >Options > Environment > Task List dialog.
Toolbox: You can drag and drop code into the Toolbox panel. Personally I prefer Code Snippets but they do need to be created by the user. Drag and drop to/from the Toolbox panel is quick and easy.
I'm sure that is very basic stuff for some of the users here!
I've also had look at how much I don't know courtesy of the book mentioned above. My list of known unknowns just got a whole lot bigger...
Last edited by MXASJ; August 8th, 2010 at 11:49 PM.
Reason: Add some screen grabs
The following 3 users say Thank You to MXASJ for this post:
Ran into my first hiccup today, but it was more of a Subversion problem than a VS/Ninja problem. Basically I was being a little bit too clever, and would love to hear of a better way to do this:
By following the steps in this thread one is building all ones VS work in the NT7>bin>Custom directory. I have an online SVN that some of my friends can access, and I share that whole project. All works, all is well.
Eight hours ago I decided I wanted a "private" folder in the SVN. Thats where it got messy. I ended up creating then deleting then creating again two seperate SVN repos. The project on my VS2010 was linked to a repos that no longer exists, and I could find no way to unbind it and kill any references to the original repos.
Deleted ankhsvn and installed a 30-day trial of VisualSVN but still no joy. The whole process was a PITA.
Luckily Beta 20 was released so I had an excuse for a clean install, which I have just done, and added that project as in my earlier posts. All is well again... BUT... I'm not putting it in the SVN until I know what I am doing .
What would be the best way to share different Ninja projects that compile in situ in VS using SVN. I recognise only one project can be open at a time in Visual Studio, but I'm sure I'm missing some basic work flow set up paradigm.
Basically I'd like to share ProjectX with Bill and Sue in one repos, and ProjectY with Tom and Lisa in another repos. I know how to set up the repos in SVN, its getting VS and Ninja to play nicely withthe SVN that is frustrating me.
Sorry, I don't have the answer, but my advice is KISS .
This is what I'm doing:
- I use my own repository, or the BMCodex one, and the files I'm working on are in specific directories, not the NT default directory for indicators/strategies/types/...
- for editing the code and writing the "skeleton" of the code, I use Notepad++, which is much better than the NT editor when you have more than 100 lines to play with
- when this code doesn't look too bad, I'm doing the initial commit to the repository
- then, I have to copy the code in the NT directory, edit it with NT, see if the compile is ok or not, do the modifications needed, and when it works like it should, I copy it back this file to my repository directory, and update it with SVN
I know this is a bit "heavy", but I didn't find a good solution for having my NT directories managed by two different repositories, and I don't think it's possible.
Usually in trading, those who know don't talk, and those who talk don't know. (Al Brooks)
success requires no deodorant! (Sun Tzu)
The following user says Thank You to sam028 for this post:
The more I learn the more I learn what I don't know. I decided to tackle a basic stand-alone WinForms app that uses NT7 as an API. This is probably where I want to be in the long run... I have a platform I can work with that works to a trading API. Keep my ideas portable.
Anyway. The SampleCSharp app that shipped with NT6.5 is broken in NT7, so I started from scratch and just added some of that apps GUI before I try to add its functionality.
If anyone is interested post back and post some code here.
Attached a screen grab of where I stand. All the middle bits work.
VS2010 is rocking my world. I have not touched WPF yet but it seems the next step...
The following 3 users say Thank You to MXASJ for this post:
We all know NT's C# abilities make it very open and powerful. But, can you tell me specifically how your trading is benefiting from all your work in Visual Studio? I believe its a fundamental type question, how you perceive the markets and your ability to make money in them.
Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.
Need help? 1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first. 2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses. 3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make. 4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance. 5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers. 6) Help using the forum? Watch this video to learn general tips on using the site.
If you want to support our community, become an Elite Member.