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)
I would like to send realtime Market Depth data from Ninjatrader to an external program. I looked at the Ninjatrader.Client.dll option but it is very poorly documented and completely unsupported by NT. Besides VS Intellisense does not show a OnMarketDepth() function to call.
Any suggestions on the best method to do this?
Can you help answer these questions from other members on NexusFi?
..."Ninjatrader.Client.dll"... you thiink to complex
- start with a simple indicator without any function
- search in the (elite) download section for a sample of live market profile oder live stats,... with a included OnMarketDepth() event function as calling sample and remove the functional code
- write own startup / terminate functions for create and dispose your needed classes
- now create a named pipe, a socket or look for window handle in your startup function
- in your OnMarketDepth() fill a structure with all needed informations and transmit this as binary record or as serialized record per WM_COPYDATA or write to pipe/socket
- write the cleanup code in your termiantion function
For all this you can use any C# sources and samples (google, microsoft...)
Write your own external receive app and make a first test. Add a good NON BLOCKING error handling in the NT7 code (connection break, reconnect,...) or better implement a additional threaded ring buffer logic in your indicator for 100% secure non blocking OnMarketDepth() work and realize the transmit code thread based.
This is all, no magic, only a little bit logic work and search for copy&paste
I hope, you well publish your version of the NT7 code part for this "problem"... up to this time no other version can be find... you the first publisher and its no "top secret" logic/work
Generally I post on futures.io (formerly BMT) any indicators that I written. But since this one will be orders of magnitude more complex than the previous ones I have written, so as long as no one laughs at my spaghetti code I'll be happy to share