I like Ninja Trader and will subscribe to it if I can get the following to work.
I am trying to access NtDirect.dll from a program that I wrote in C++ (using Visual Studio 2008).
I cannot access the functions in NtDirect.dll properly.
I wrote similar programs (and dll's) for the MetaTrader platform and they work flawlessly. I can't understand why my program does not work with NinjaTrader. I researched this issue and found that the answer involves complex, tedious programming using .NET interop. If this is the case, then I will not bother because of the instability of the variable passing and the long hours of programming involved.
Please prove me wrong by providing an easy way to load the NtDirect.dll functions into my C++ program-then you will get my subscription.
Below is all I have to do to get it to work with Metatrader(I tried to change it to work with NinjaTrader, but it wont work). Visual Studio says that the SubscribeMarketData function takes two integers as inputs, while the NinjaTrader documentation says that it takes a string.
HINSTANCE Ninjainstance;
MYPROC Ninja1;
LONG Ninjatest1;
Ninjainstance=LoadLibrary((LPCTSTR)L"C:\\Program Files\\NinjaTrader 6.5\\bin\\NtDirect.dll");
Ninja1=(MYPROC)GetProcAddress(Ninjainstance,"Subsc ribeMarketData");
Ninjatest1=(Ninja1)(L"EURUSD");
Any suggestions will be helpful.
Thanks,
Nate9999
Comment