How to check your code using Visual Studio and FxCop - NinjaTrader Programming | futures io social day trading
futures io futures trading


How to check your code using Visual Studio and FxCop
Updated: Views / Replies:6,438 / 4
Created: by gomi Attachments:4

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

How to check your code using Visual Studio and FxCop

  #1 (permalink)
Elite Member
Paris
 
Futures Experience: None
Platform: NinjaTrader
 
Posts: 1,177 since Oct 2009
Thanks: 228 given, 4,097 received

How to check your code using Visual Studio and FxCop

On the .net platform there are code analysis stuff that help you to find errors in code. Most well-known is FxCop


To use them, first you must build a projet using Visual Studio.
EDIT : Actually it's not true : you can run FxCop without using VS : see post #4

For that, create a new project, type dll, target .Net 3.0 for NT6.5, and target .Net 3.5 for NT7.

Then basically you need to add references to NinjaTrader.Core and WilsonOrMApper (in NT binaries folder). (cf picture)

Then add the indicator files, using "Add as Link" (cf Picture).
You must add
  • your indicators,
  • @ADX and @Indicator(Indicator folder),
  • @Column(Market Analyzer folder)
  • @and Strategy (Strategy Analyzer)

Then you can compile your project as dll.


You can make changes to the source, they will be done on the NT file as well because of the link.


If you are using a high version of VS2010, code analysis tools are included in Analyze menu.
Results are shown in the IDE : it's clear I forgot to Dipose of a Font object. (see Picture)

If you do not have an included code analyzer in the VS you use, you can use the FxCop tool free from MS : in Fxcop Open the dll (Add Targets... from the menu) you just created, and tada, from here too I can see I forgot the Font disposal.

Hope it might help someone.

Attached Thumbnails
How to check your code using Visual Studio and FxCop-addaslink.png   How to check your code using Visual Studio and FxCop-vs2010.png   How to check your code using Visual Studio and FxCop-fxcop.png  

Last edited by gomi; May 13th, 2010 at 10:20 AM.
Reply With Quote
The following 11 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,240 since Jun 2009
Thanks: 29,354 given, 83,237 received


Thx Gomi, this is now a 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,177 since Oct 2009
Thanks: 228 given, 4,097 received

Thks Mike. Actually it occured to me that you don't need Visual Studio at all to use FxCop.

Just open FxCop, Add Target... the NinjaTrader.Custom.dll which is the dll NT builds when it compiles. It's located in MyDocuments/NinjaTrader/bin/Custom folder.

It will ask to locate the NT Core dll, which is in Program Files/NinjaTrader/bin folder

Then run Analyze : all the Indicators are run through FxCop (see pic)

Attached Thumbnails
How to check your code using Visual Studio and FxCop-fxcop2.png  
Reply With Quote
The following 6 users say Thank You to gomi for this post:
 
  #5 (permalink)
Elite Member
San Diego, CA USA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: ES
 
GridKing's Avatar
 
Posts: 3,650 since May 2011
Thanks: 588 given, 877 received

Thanks @gomi again!

I've just been reading mostly and trying to understand it a bit more... can you please answer a question or two when you have the time, or anyone...thanks in advance


I would like to know what might be the least intrusive or demanding form of communication to get at raw data, is it possible to use only part or less of NT and get results for some things? I am trying to figure out how to use a lot more data and less stuff , but not really sure what I am looking for... I read some of the different languages , just the basics , I want something simple and fast like dde but the way it is supposed to be so that everything works together smoothly and still have plenty of room for other things as well to build on as I learn and have it all work together...

Thanks

"Successful trading is one long journey, not a destination" Peter Borish Former Head of Research for Paul Tudor Jones speaking on conversations with John F. Carter
Reply With Quote

Reply



futures io > > > > > How to check your code using Visual Studio and FxCop

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Profile your code using Visual Studio 2010 gomi NinjaTrader Programming 21 January 13th, 2014 10:08 AM
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 02:37 AM.

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-17 in 0.10 seconds with 20 queries on phoenix via your IP 54.82.56.95