I’m wondering if you can help me?
I’ve been trying to get access to the NT functions via Visual Studio – Express at this stage, but I would like to upgrade to the full version once I get this working.
I’ve tried to follow the discussions on the following threads:
http://www.ninjatrader-support2.com/vb/showthread.php?t=6971
http://www.ninjatrader-support2.com/vb/showthread.php?p=94393
I’ve tried to import the COM object, using .Net Interpo services. And I’ve tried to use the dll workaround that a number of people have mentioned in their threads – e.g. using NinjaTrader.Client.Dll and not the recommended NTDirect.dll.
When I try the recommended COM route I get the error message in the screen shot “not com” – this is on trying to import the NtDirect.dll into my VS project as a reference.
When I try to use the other route - NinjaTrader.Client.Dll – I can’t seem to access the functions within the dll correctly. For instance, when I try to do a simple line by printing, I get issues not being able to use the overridden functions of Print(“”). I get all sorts of errors e.g. “Print() does not exist in the current context”.
I would obviously like to use the NT supported route – i.e. NTDirect.dll. That way, we should see that interface continually supported. I know that some have had luck with using the non-supported route (i.e. NinjaTrader.Client.Dll), however, I understand if NT are saying it is not supported they must have good reasons (e.g. volatile code base and interfaces across upgrades maybe?).
I did note that that NinjaTrader.Client.Dll doesn’t appear to contain any of the indicators as objects – this appears to be contained in NinjaTrader.Custom.dll. Additionally, there appears to be two versions of this dll on my machine. One in the NT install directory (Vista) – a back-up version and the version with my developed strategies as part of the namespace – in My Documents\NinjaTrader 6.5\bin\Custom.
(As an aside - overridden print function appears to be contained in the NinjaTrader.core dll - C:\Program Files (x86)\NinjaTrader 6.5\bin\NinjaTrader.Core.dll).
I have found this article which talks about putting a Runtime Callable Wrapper around a COM Type Library - http://www.codeproject.com/KB/COM/cominterop.aspx. However, I notice that the only Type library to be imported that relates to NT is the NinjaTrader Client (see screen shot – Add reference.jpg).
After trying to put a RCW around this dll it obviously doesn’t work – as it isn’t a type library.
I would appreciate any help anyone can offer, even if it is just a pointer to the relevant documentation.
Kind regards,
Dan
Comment