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.
..."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
The following 2 users say Thank You to TimeTrade for this post:
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