Taking The Ninja Trader 7 Beta Out For A Spin
If you haven’t noticed, NinjaTrader has a new version coming out in NinjaTrader 7 ( NT7). It has a lot of improvements over NinjaTrader 6.5 (NT6.5) as well as some changes that you need to make in your code.
FIRST IMPRESSION
My first impression was “Hey, this looks just like NinjaTrader 6.5″. It is true, it does. Not like switching from Windows XP to Vista. ( Although I am not sure, I still use XP, but I heard they look different )
The application still looks like NinjaTrader 6.5 but under the hood, there has been a lot of work.
SECOND IMPRESSION
My second impression, is much better. After using it , I think NT7 delivers. Now, it is not ready for prime time , but it is close. I use it for all my backtesting now. I get funny debugging messages sometimes, but I assume they will go away when it ships.
NT7 is still in beta , so I won’t discuss the features that I really , really like. You can check that out on the website. I had one little GUI pet peeve that I HATED in NT 6.5, and they took care of that in NT Â 7.0, is I think they have been trying to take care of a lot of bugs at once.
I have a Win7 machine that has been running NT7 continuously on a Mirus feed and a few strategies just to see when it ‘falls down and can’t get up’. So far it is much better than 6.5. ( This was a virgin install with nothing on it but NT7, source control and anti virus. Stable as a rock …. so far.
BRINGING YOUR SOURCE OVER FROM 6.5
There are some code breaking changes, and some that are only slightly code breaking. ( I will talk about that in the next section )
There is a document, appropritaely called NinjaScript Code Breaking Changes for NinjaTrader 7 that discusses most of the changes. They are all pretty minor, and won’t cause any major problems. I have a pretty large codebase of indicators and strategies and I brought them all over very quickly.
MAKING 6.5 & 7 INDICATORS COMPATIBLE
If you want to run your indicators in 6.5 and 7 simultaneously, you can use C# pre-processor directives. Note that the .zip archives will still be incompatible if you distribute using zip archives. Take a look at this document Best Practices for Distributing NinjaScript Objects
What a pre-processor directive does is perform actions before the code is compiled. If you want to have code that is only compiled in NT7, you would put it in between #if and #endif statements.  If you want to maintain one codebase  you could use NT7 to generate your NT7 and NT6.5 compatible indicators but , you can NOT use NT6.5 to generate NT7 indicators. That would be bad.
In this example, we compile an indicator with code for NT7 & NT6.5
#if NT7
Print("NT7 Code);
#else
Print("Not NT7");
#endif
Hat tip to r2kTrader
Photo by kevindooley



