Profile your code using Visual Studio 2010
futures io futures trading



Profile your code using Visual Studio 2010


NinjaTrader

Created May 13th 2010 by gomi
Updated January 13th 2014 by matt44545
looks_onegomi with 7 posts (23 thanks)
looks_twoTaddypole with 3 posts (0 thanks)
looks_3Big Mike with 2 posts (0 thanks)
looks_4DrMatt with 2 posts (0 thanks)
 
trending_up27,070 views
thumb_up27 thanks given
forum21 replies
attach_file11 attachments



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

Profile your code using Visual Studio 2010

  #1 (permalink)
Paris
 
Trading Experience: None
Platform: NinjaTrader
 
Posts: 1,234 since Oct 2009
Thanks: 262 given, 4,342 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 09:27 AM.
Reply With Quote
The following 14 users say Thank You to gomi for this post:

Can you help answer these questions
from other members on futures io?
Does Tradestation on windows server?
TradeStation
market_cipher5_bg
ThinkOrSwim
Plot line has gaps/disconnected on intraday charts
ThinkOrSwim
coding studies
ThinkOrSwim
Medved Trader?
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on futures io
ES futures Spoo-nalysis SP500/SPX
217 thanks
Recession? Depression? Bailout!
214 thanks
Coronavirus COVID-19
161 thanks
Understanding Footprint Charts / Number bars
71 thanks
What's your "comfort" number?
40 thanks
 
  #2 (permalink)
Site Administrator
Manta, Ecuador
 
Trading Experience: Advanced
Platform: My own custom solution
Favorite Futures: SPX, Emini Futures
 
Big Mike's Avatar
 
Posts: 48,195 since Jun 2009
Thanks: 30,783 given, 92,142 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 (see why)

Follow me on Twitter Visit my Facebook Visit my futures io Trade Journal Reply With Quote
 
  #3 (permalink)
Paris
 
Trading Experience: None
Platform: NinjaTrader
 
Posts: 1,234 since Oct 2009
Thanks: 262 given, 4,342 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:
 
  #4 (permalink)
Chicago, IL. USA
 
 
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
 
  #5 (permalink)
Paris
 
Trading Experience: None
Platform: NinjaTrader
 
Posts: 1,234 since Oct 2009
Thanks: 262 given, 4,342 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
 
  #6 (permalink)
Administrator: Retired Backtester
Rennes France
 
Trading Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
sam028's Avatar
 
Posts: 3,615 since Jun 2009
Thanks: 3,752 given, 4,414 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)
Follow me on Twitter Reply With Quote
 
  #7 (permalink)
Paris
 
Trading Experience: None
Platform: NinjaTrader
 
Posts: 1,234 since Oct 2009
Thanks: 262 given, 4,342 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:
 
  #8 (permalink)
Newcastle NSW Australia
 
 
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
 
  #9 (permalink)
Paris
 
Trading Experience: None
Platform: NinjaTrader
 
Posts: 1,234 since Oct 2009
Thanks: 262 given, 4,342 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:
 
  #10 (permalink)
Newcastle NSW Australia
 
 
Posts: 8 since Aug 2012
Thanks: 46 given, 3 received



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



Thanks,

How much is the full blown version?

Reply With Quote

Reply



futures io Trading Community Platforms and Indicators NinjaTrader > 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)
 

futures io is celebrating 10-years w/ over $18,000 in prizes!

Right now
 

$250 Amazon Gift Cards with our "Thanks Contest" challenge!

Right now
 

Social Media Predictive Data for Traders w/Joe Gits @ SMA [and Lime Brokerage]

Apr 9
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to check your code using Visual Studio and FxCop gomi NinjaTrader 4 July 17th, 2012 07:46 PM
Using Visual Studio (Express) w/ NT LostTrader NinjaTrader 3 July 28th, 2010 07:48 PM
How-to profile NinjaTrader code with Visual Studio 2010 Big Mike Help, Tutorials, and How-Tos 0 July 6th, 2010 10:39 PM
Visual Studio 08 NT programming symphys NinjaTrader 5 March 8th, 2010 04:45 AM
Will Visual Studio 2008(5, 10?) help? MXASJ NinjaTrader 2 November 8th, 2009 07:55 AM


All times are GMT -4. The time now is 05:43 PM. (this page content is cached, log in for real-time version)

Copyright © 2020 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