Profile your code using Visual Studio 2010 - NinjaTrader Programming | futures io social day trading
futures io futures trading


Profile your code using Visual Studio 2010
Updated: Views / Replies:24,640 / 21
Created: by gomi Attachments:11

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
 11  
 
Thread Tools Search this Thread
 

Profile your code using Visual Studio 2010

  #1 (permalink)
Elite Member
Paris
 
Futures Experience: None
Platform: NinjaTrader
 
Posts: 1,173 since Oct 2009
Thanks: 227 given, 4,089 received

Profile your code using Visual Studio 2010

Of course you will need a full blown version of VS2010 to use included profiler.
You can also use a demo version of a commercial product, usually they install as add-ons of Visual Studio.

In VS2010, launch Performance Wizard in Analyze menu.

Use standard settings(CPU Sampling), and select NinjaTrader .exe file.

This starts the profiler, which starts Ninjatrader.

Then do you stuff in NinjaTrader, and stop profiling in VS2010 when you're done. Careful, it will kill your NT session.

You get a graph showing CPU usage ; you can select parts of the graph and click "Filter on Selection" to narrow on a specific part.

If you click on "Show Hot Lines" you get a more detailed view of the methods where most CPU was spent. (use "column 3exclusive samples %")

You can also use "Call Tree" to show the most exensive Call Tree

Here's a few charts with an optimization idea example.

Attached Thumbnails
Profile your code using Visual Studio 2010-profileinit.png   Profile your code using Visual Studio 2010-profileinitct.png   Profile your code using Visual Studio 2010-profrendering.png   Profile your code using Visual Studio 2010-profrenderingshshowhot.png  

Last edited by gomi; May 13th, 2010 at 10:27 AM.
Reply With Quote
The following 13 users say Thank You to gomi for this post:
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (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,215 received


Sticky

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
 
  #4 (permalink)
Elite Member
Paris
 
Futures Experience: None
Platform: NinjaTrader
 
Posts: 1,173 since Oct 2009
Thanks: 227 given, 4,089 received

Update : I was having some performance problems and was willing to be able to get a full symbol profiling.

So tried a few things and here's a solution : when in profile mode, open an indicator, select debug mode an recompile. This will recreate the debugger symbol file the profiler needs.

Then run your time-consuming task and stop profiling ; you'll be able access something like the attached screen : oops, looks like i'm spending 23,6 % of my time doing useless time calculations....

Attached Thumbnails
Profile your code using Visual Studio 2010-profiler.png  
Reply With Quote
The following 2 users say Thank You to gomi for this post:
 
  #5 (permalink)
Trading Apprentice
Chicago, IL. USA
 
Futures Experience: Advanced
Platform: Ninja Trader
Favorite Futures: Mini Indexes
 
Posts: 20 since Nov 2010
Thanks: 2 given, 5 received

Do you find the new NT version 7 to be more user-friendly ?

Reply With Quote
 
  #6 (permalink)
Elite Member
Paris
 
Futures Experience: None
Platform: NinjaTrader
 
Posts: 1,173 since Oct 2009
Thanks: 227 given, 4,089 received

As far as debugging is concerned, I had lots of problems with NT 6.5 and VS 2008. Debugger never wanted to attach to process, VS always crashed on NT exceptions etc...
But NT 7 with VS 2010 works perfectly well.

Reply With Quote
 
  #7 (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


gomi View Post
As far as debugging is concerned, I had lots of problems with NT 6.5 and VS 2008. Debugger never wanted to attach to process, VS always crashed on NT exceptions etc...
But NT 7 with VS 2010 works perfectly well.

Don't you have NT7 crashing during debugging session ? I have some crash sometimes; it seems that NT7 don't like to be frozen during more than few minutes.

Success requires no deodorant! (Sun Tzu)
Reply With Quote
 
  #8 (permalink)
Elite Member
Paris
 
Futures Experience: None
Platform: NinjaTrader
 
Posts: 1,173 since Oct 2009
Thanks: 227 given, 4,089 received

Well I'm not sure I freeze it during several minutes to do data inspection, till now it has never crashed on me.

Reply With Quote
The following user says Thank You to gomi for this post:
 
  #9 (permalink)
Trading Apprentice
Newcastle NSW Australia
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: NinjaTrader Brokerage
Favorite Futures: ES, NQ and SPI
 
Posts: 8 since Aug 2012
Thanks: 46 given, 3 received


gomi View Post
Of course you will need a full blown version of VS2010 to use included profiler.
You can also use a demo version of a commercial product, usually they install as add-ons of Visual Studio.

In VS2010, launch Performance Wizard in Analyze menu.

Use standard settings(CPU Sampling), and select NinjaTrader .exe file.

This starts the profiler, which starts Ninjatrader.

Then do you stuff in NinjaTrader, and stop profiling in VS2010 when you're done. Careful, it will kill your NT session.

You get a graph showing CPU usage ; you can select parts of the graph and click "Filter on Selection" to narrow on a specific part.

If you click on "Show Hot Lines" you get a more detailed view of the methods where most CPU was spent. (use "column 3exclusive samples %")









You can also use "Call Tree" to show the most exensive Call Tree

Here's a few charts with an optimization idea example.

I have a free version of VS 2010. I guess this will work?

Reply With Quote
 
  #10 (permalink)
Elite Member
Paris
 
Futures Experience: None
Platform: NinjaTrader
 
Posts: 1,173 since Oct 2009
Thanks: 227 given, 4,089 received


Pretty sure you don't have any profiler in VS 2010 express, so no, it won't work.

Reply With Quote
The following user says Thank You to gomi for this post:

Reply



futures io > > > > > Profile your code using Visual Studio 2010

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
How to check your code using Visual Studio and FxCop gomi NinjaTrader Programming 4 July 17th, 2012 08:46 PM
Using Visual Studio (Express) w/ NT LostTrader NinjaTrader Programming 3 July 28th, 2010 08:48 PM
How-to profile NinjaTrader code with Visual Studio 2010 Big Mike Help, Tutorials, and How-Tos 0 July 6th, 2010 11:39 PM
Visual Studio 08 NT programming symphys NinjaTrader Programming 5 March 8th, 2010 05:45 AM
Will Visual Studio 2008(5, 10?) help? MXASJ NinjaTrader Programming 2 November 8th, 2009 08:55 AM


All times are GMT -4. The time now is 01:35 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.10 seconds with 20 queries on phoenix via your IP 54.145.16.43