NinjaTrader and VS2010 for Dummies - NinjaTrader Programming | futures io social day trading
futures io futures trading


NinjaTrader and VS2010 for Dummies
Updated: Views / Replies:24,831 / 48
Created: by MXASJ Attachments:13

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 13  
 
Thread Tools Search this Thread
 

NinjaTrader and VS2010 for Dummies

  #21 (permalink)
Elite Member
Santa Maria
 
Futures Experience: Advanced
Platform: NinjaTrader, ThinkOrSwim
Broker/Data: Mirus/Zen-Fire
Favorite Futures: ES
 
Posts: 295 since May 2010
Thanks: 101 given, 320 received


baruchs View Post
I use VS only for debugging. I don't see any advantages in editing in it...

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!

Thank you.

Reply With Quote
 
  #22 (permalink)
Elite Member
Israel
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: pfg
Favorite Futures: eminis
 
Posts: 323 since Jun 2009
Thanks: 6 given, 206 received

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.

Baruch
p.s.
I write it from memory so I hope the explanation is complete.

Reply With Quote
The following 10 users say Thank You to baruchs for this post:
 
  #23 (permalink)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
sam028's Avatar
 
Posts: 3,366 since Jun 2009
Thanks: 3,571 given, 3,982 received



baruchs View Post
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.

Baruch
p.s.
I write it from memory so I hope the explanation is complete.

The explanation for debugging is already here, without VS, but it's exactly the same thing.

Success requires no deodorant! (Sun Tzu)
Reply With Quote
The following 3 users say Thank You to sam028 for this post:
 
  #24 (permalink)
Elite Member
Israel
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: pfg
Favorite Futures: eminis
 
Posts: 323 since Jun 2009
Thanks: 6 given, 206 received


Quoting 
The explanation for debugging is already here, without VS, but it's exactly the same thing.

Why couldn't you post it 6 minutes before and save me the trouble?

Reply With Quote
 
  #25 (permalink)
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 786 received

My weekend reading:

Amazon.com: Professional Visual Studio 2010 (Wrox Programmer to Programmer) (9780470548653):…

Not a book on how to program, but instead a book on how to use the features included in Visual Studio 2010 Pro and an introduction to some of the tools found in the higher-end editions.

Reply With Quote
The following user says Thank You to MXASJ for this post:
 
  #26 (permalink)
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 786 received

Some things I learned after some RTFM time:

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...

Attached Thumbnails
NinjaTrader and VS2010 for Dummies-todo.jpg   NinjaTrader and VS2010 for Dummies-options.jpg   NinjaTrader and VS2010 for Dummies-toolbox.jpg  

Last edited by MXASJ; August 9th, 2010 at 12:49 AM. Reason: Add some screen grabs
Reply With Quote
The following 3 users say Thank You to MXASJ for this post:
 
  #27 (permalink)
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 786 received

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.

I am open to suggestions!

Reply With Quote
 
  #28 (permalink)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
sam028's Avatar
 
Posts: 3,366 since Jun 2009
Thanks: 3,571 given, 3,982 received

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.

Success requires no deodorant! (Sun Tzu)
Reply With Quote
The following user says Thank You to sam028 for this post:
 
  #29 (permalink)
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 786 received

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...

Attached Thumbnails
NinjaTrader and VS2010 for Dummies-apitest.jpg  
Reply With Quote
The following 4 users say Thank You to MXASJ for this post:
 
  #30 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,217 received


I have a generic question for you.

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.

Mike

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.

Reply With Quote

Reply



futures io > > > > > NinjaTrader and VS2010 for Dummies

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
DENNIS MILLER: MIDDLE EAST FOR DUMMIES tigertrader Off-Topic 0 October 16th, 2010 12:32 PM
Central Banking For Dummies ntsst3 Off-Topic 0 October 14th, 2010 11:43 PM
Can NinjaTrader data be stored other than \My Documents\NinjaTrader 6.5 tc12357 NinjaTrader 4 December 15th, 2009 02:55 PM
Programming for dummies - Help Ausy Mick NinjaTrader Programming 9 September 21st, 2009 01:33 PM


All times are GMT -4. The time now is 05:04 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-11 in 0.14 seconds with 20 queries on phoenix via your IP 54.226.132.197