NexusFi: Find Your Edge


Home Menu

 





Feed Ninja with my demo generator?


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one blt31 with 3 posts (0 thanks)
    2. looks_two Big Mike with 1 posts (0 thanks)
    3. looks_3 NinjaTrader with 1 posts (0 thanks)
    4. looks_4 ratfink with 1 posts (2 thanks)
    1. trending_up 2,022 views
    2. thumb_up 2 thanks given
    3. group 1 followers
    1. forum 7 posts
    2. attach_file 1 attachments




 
Search this Thread

Feed Ninja with my demo generator?

  #1 (permalink)
blt31
Paris France
 
Posts: 3 since Oct 2013
Thanks Given: 0
Thanks Received: 0

Dear all,

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

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Exit Strategy
NinjaTrader
Are there any eval firms that allow you to sink to your …
Traders Hideout
 
  #3 (permalink)
 
MrYou's Avatar
 MrYou 
NC, USA
 
Experience: None
Platform: None Yet
Trading: Guitar
Posts: 403 since Jun 2011
Thanks Given: 618
Thanks Received: 196



blt31 View Post
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 ?

For this purpose (fake data quotes) NinjaTrader has a builtin "Simulated Data Feed".


blt31 View Post
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)

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."

These features are available in the free version.

Reply With Quote
  #4 (permalink)
blt31
Paris France
 
Posts: 3 since Oct 2013
Thanks Given: 0
Thanks Received: 0


MrYou View Post
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."

These features are available in the free version.

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 ?

Reply With Quote
  #5 (permalink)
 
NinjaTrader's Avatar
 NinjaTrader  NinjaTrader is an official Site Sponsor
Site Sponsor

Web: NinjaTrader
AMA: Ask Me Anything
Webinars: NinjaTrader Webinars
Elite offer: Click here
 
Posts: 1,713 since May 2010
Thanks Given: 203
Thanks Received: 2,686


blt31 View Post
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 ?

You can check out the TradeStation Easy Language script that implements the External Data Feed for passing real-time data to NinjaTrader.

Finding this file and it's real-time usage is all explained here - NinjaTrader stock, futures and forex charting software and online trading platform. TradeStation Connection Guide.

Follow me on Twitter Reply With Quote
  #6 (permalink)
 
ratfink's Avatar
 ratfink 
Birmingham UK
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: TST/Rithmic
Trading: YM/Gold
Posts: 3,633 since Dec 2012
Thanks Given: 17,423
Thanks Received: 8,425


blt31 View Post
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...

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.

Cheers

Travel Well
Attached Files
Elite Membership required to download: ForBit31.zip
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #7 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,398 since Jun 2009
Thanks Given: 33,173
Thanks Received: 101,537

You can also find a very extensive discussion and advanced Windows app that generates random data based on learning source data:



Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #8 (permalink)
blt31
Paris France
 
Posts: 3 since Oct 2013
Thanks Given: 0
Thanks Received: 0

woaaaw great !

many thanks i'm gonna to study all these ! thank a lot !

best regards

Reply With Quote




Last Updated on October 9, 2013


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts