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 know if it is possible to *simulate* a continuous live feed with quotes to Ninja, (assuming i write a program that produce/generate continuous some fake ticks produced by a random walk) ?
I'm already capable of generating fake data quotes/timestamp, my question is about how to plug it to Ninja so that it see/use it as a continuous live feed ?
Is it possible ? How should i do ?
I've also found some people that explain that "tcp/ip client server communication" may be possible with NT, by the way i didn't found any other information about what kind of network packets that may be sent to NT or what NT expected to receive...
Please notice that i really do want to plug *my own* data progammed live feed and *not use any replay* or demo account ! (for replay accound, unless it can be used in real time)
(i've already successfully imported some historical data inside NT from a text file, but what about if this text file is conunously growing. Or should it be send by a particular protocol ? which one ?)
(i hope that i do not have miss similar question here, i already have asket to The NT guys, but did not get much more help...)
(i'm in the process of buying Ninja to study it and do some backtests, i'm tired ot these other platforms, but i would not be able to afford having real account during this process, and having a 1 or 2 weeks demo won't be enough, also i want tp plug my own data collector to NT...)
thx for any insight or pointers to documentation,
best regards
Can you help answer these questions from other members on NexusFi?
For this purpose (fake data quotes) NinjaTrader has a builtin "Simulated Data Feed".
For this purpose you would want to use NinjaTraders builtin "External Data Feed" API:
"This connection targets those traders who have programming experience and wish to create a market data link between their charting or custom application and NinjaTrader which allows them to use the full functionality of NinjaTrader simulator. Please refer to the Ask and Bid functions of the DLL Interface."
Thak you for your replay, i get almost the same of the NT Team,
(for now i can not post links as i'm new to this forum, but you can find my thread @ their forums, same nickname)
BTW, i was hoping that someone here have more to say, may be done something approaching or even have a C# skeleton to share or even having some specifications of the stream that NT is expecting...
the DLL interface documentation is rather really really short on this subject ! (i found nothing valuable inside but i may be wrong)
Also, if i can produce and feed continuously data through "Simulated Data Feed" builtin, will be processed as a real live data feed ?
Attached is a ZIP file of a simple Windows console client I created for my own use a couple of years ago, I apologise in advance large buckets for the really ugly code but is is a hacked hack of a test harness I created of a hack of a tcp demo and I never had time to rewrite it, you know the sort of story...
It establishes a simple tcp client/server connection, it being the client and expecting a normal tcpListener/tcpSocket type server at the other end to share a simple send-ack protocol between them. You really don't need raw network speed for this sort of application. You could write one the other way around if that was better for you, or use a completely different data link method.
For the NT DLL usage you are only really interested in the block of code in the str.Contains("run") section. It just accepts my own format ascii strings over the tcp connection and uses the NT DLL Bid/Ask/Last calls to feed price and volume data into Ninja. I also implemented my own timestamping mechanism to filter historical data otherwise Ninja puts it all in the last bar of any extant charts, pity.
I have not made use of any of the trade functions so can't help you there. I also optimised data transmission by effectively only sending price changes with accompanying aggregated volume, that worked well for me for minute based charts for many instruments. I haven't loaded it with high speed tick data so couldn't really comment on likely results, but at a guess wouldn't recommend this approach for that.
The strings are basically <instrument name><timestamp><ticksize><price><up volume><down volume> for live data, and an OHLC version for historical data. You may obviously want to use your own formats and approaches to transmission and insertion, as far as Ninja and the DLL are concerned the 'stream' is just a series of DLL calls.
I built it using the free VisualStudio2010 and although well ugly the resulting console application is stable and fast, I don't use it currently but ran it for about 18 months, often 24/7, maybe it can help you get started.
I have no idea what the likely future for the DLL interface is (i.e. with NT8 in mind), only that this approach worked well for me for now, although I would counsel that you can end up spending *way* too much time doing this sort of stuff.
I've noticed that Big Mike was interested about generating random data a couple years ago. There is a thread about it here in futures.io (formerly BMT) but nobody really seemed to be interested at the time. Anyway, I believe it's a very good idea …