Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
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.
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)
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