NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > Application Technical Support > Miscellaneous Support

Miscellaneous Support Miscellaneous support issues.

Reply
 
Thread Tools Display Modes
Old 01-07-2011, 03:02 PM   #1
Blue Waters
Junior Member
 
Join Date: Jan 2011
Posts: 22
Thanks: 0
Thanked 0 times in 0 posts
Default External Data Feed Using C#.

Hi,

I'm going to start working on building an external data feed for NT using C#. It looks like I will have use the following .NET function to push the last price into NT from the external data source.

---
int Last(string instrument, double price, int size)
Sets the last price and size for the specified instrument. A return value of 0 indicates success and -1 indicates an error.
---

So if I am working for 10 different futures symbols, do I have to repeat that function call above 10 times (once for each symbol)?

Also I have to map these symbols to NT, right?

Thank you!
Blue Waters is offline  
Reply With Quote
Old 01-07-2011, 03:50 PM   #2
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Hello BlueWaters,

Welcome to the NinjaTrader forums!

Yes, instrument is a parameter here so you need this for each instrument.

Yes, the mapping is done under the External feed for individual instruments. Tools > Instrument Manager > Edit instrument > Misc tab.
NinjaTrader_RyanM is offline  
Reply With Quote
Old 01-07-2011, 03:53 PM   #3
Blue Waters
Junior Member
 
Join Date: Jan 2011
Posts: 22
Thanks: 0
Thanked 0 times in 0 posts
Default

Ryan,

Thank you for your quick response. Have a great weekend.
Blue Waters is offline  
Reply With Quote
Old 01-10-2011, 05:46 PM   #4
Blue Waters
Junior Member
 
Join Date: Jan 2011
Posts: 22
Thanks: 0
Thanked 0 times in 0 posts
Default

Hi Ryan,

The external data feed I'm working on will be running on historical data too. Will NT see the incoming historical data as real-time data since I can't pass date and time into the 'Last(string instrument, double price, int size)' function?

Another question... I'm running the Ninja Trader C# Sample Application. However, I get the following error:

"Unable to connect to NinjaTrader (127.0.0.1/36973). Please make sure NinjaTrader is running: Object reference not set to an instance of an Object." Any suggestions? AT interface under File menu is checked.

Thanks
Last edited by Blue Waters; 01-11-2011 at 01:54 AM.
Blue Waters is offline  
Reply With Quote
Old 01-11-2011, 08:29 AM   #5
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

You can use LastPlayback for historical prices.
int LastPlayback(string instrument, double price, int size, string timestamp)

Unfortunately we no longer offer support for the C# application. It should still work but you will have to work through any issues that come up.
NinjaTrader_RyanM is offline  
Reply With Quote
Old 01-11-2011, 10:41 AM   #6
Blue Waters
Junior Member
 
Join Date: Jan 2011
Posts: 22
Thanks: 0
Thanked 0 times in 0 posts
Default

Ryan,

Thanks. I will post the connection problem as a separate thread. Maybe other users might be able to help me.
Blue Waters is offline  
Reply With Quote
Old 01-11-2011, 11:57 AM   #7
Blue Waters
Junior Member
 
Join Date: Jan 2011
Posts: 22
Thanks: 0
Thanked 0 times in 0 posts
Default

Ryan,

One more question... Does NinjaTrader officially support the .NET interface?

Thanks.
Blue Waters is offline  
Reply With Quote
Old 01-11-2011, 12:05 PM   #8
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,377
Thanks: 252
Thanked 966 times in 949 posts
Default

Blue Waters, officially supported would be those AT interface types - http://www.ninjatrader.com/support/h...ed_trading.htm
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 01-11-2011, 12:12 PM   #9
Blue Waters
Junior Member
 
Join Date: Jan 2011
Posts: 22
Thanks: 0
Thanked 0 times in 0 posts
Default

Bertrand,

This is where I am getting confused at. The text of the link you sent says:

"NinjaTrader provides TradeStation and eSignal integration, File Interface, DLL Interface, and a .NET Interface which ensures that you can communicate with NinjaTrader from any application such as but not limited to:

• Popular charting applications such as but not limited to TradeStation, eSignal, NeoTicker, and Investor RT
• Custom applications written in but not limited to Visual Studio .NET, Visual Basic, Delphi, and MS Excel
• Black box trading systems"


Then it only lists the following.

Interface Options
► File
► DLL

This is where I get confused. Does .NET interface still get supported?

Thanks.
Blue Waters is offline  
Reply With Quote
Old 01-11-2011, 01:29 PM   #10
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

NinjaTrader is built with .net and we support the .net items documented in our help guide and the reference samples.

.net items that are not included in the help guide or reference samples are not supported.

You're welcome to add additional libraries and use unsupported items, but we are unable to assist with implementation or if any issues come up while using them.
NinjaTrader_RyanM is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
External Data Feed sfunds Connecting 1 09-25-2009 05:21 AM
External Data Feed... fxRichard Connecting 2 07-20-2008 06:41 AM
Tradestation External data feed greg_gross90 Connecting 12 04-30-2008 03:12 PM
Tradestation external data feed greg_gross90 Connecting 1 04-09-2008 11:40 AM
external data feed riccja Connecting 2 05-01-2007 04:37 AM


All times are GMT -6. The time now is 02:38 PM.