NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > Application Technical Support > Automated Trading

Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader.

Reply
 
Thread Tools Display Modes
Old 02-15-2011, 01:20 PM   #1
joanNT
Senior Member
 
Join Date: Feb 2010
Posts: 128
Thanks: 0
Thanked 0 times in 0 posts
Default Connecting NT with NinjaTrader API and IB connection

Hi there!

please I'm doing some tests to the API of AT Interface while connected to IB and I don't get any quotes (Bid, Ask, Last) with MarketData function, but if I try with the simulated data feed connection then all works well and I get the quotes.

Do you know which can be the problem regarding the IB connection?

Thanks in advance
joanNT is offline  
Reply With Quote
Old 02-15-2011, 01:40 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 JoanNT,

Are you enabled for this data through IB? What happens when you select this instrument in the control center? Are bid / ask / last available there?
NinjaTrader_RyanM is offline  
Reply With Quote
Old 02-15-2011, 02:24 PM   #3
joanNT
Senior Member
 
Join Date: Feb 2010
Posts: 128
Thanks: 0
Thanked 0 times in 0 posts
Default

When I select the instrument "ES 03-11" in control center I can see the bid, ask and last quotes.
joanNT is offline  
Reply With Quote
Old 02-15-2011, 02:30 PM   #4
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

Did you first use SubscribeMarketData(string instrument) ?

What is the result of calling this?

Starts a market data stream for the specific instrument. Call the MarketData() function to retrieve prices. Make sure you call the UnSubscribeMarketData() function to close the data stream. A return value of 0 indicates success and -1 indicates an error.

http://www.ninjatrader.com/support/h...sub=MarketData
NinjaTrader_RyanM is offline  
Reply With Quote
Old 02-15-2011, 02:35 PM   #5
joanNT
Senior Member
 
Join Date: Feb 2010
Posts: 128
Thanks: 0
Thanked 0 times in 0 posts
Default

Hi Ryan,

Did you first use SubscribeMarketData(string instrument) ?

Yes, with "ES 03-11" as instrument

What is the result of calling this?

the result is zero, in both connections, then the result is right

After this I use the MarketData() function to retrieve prices. This works on the simulated data feed connection but not for IB connection, this is my problem, do you know any issue to fix this?

thanks again
joanNT is offline  
Reply With Quote
Old 02-15-2011, 03:16 PM   #6
joanNT
Senior Member
 
Join Date: Feb 2010
Posts: 128
Thanks: 0
Thanked 0 times in 0 posts
Default

I dont know if this could be important to solve this issue I have:

I've added the reference DLL from C:\Program files\NinjaTrader 7\bin\NinjaTrader.Client.dll
I was trying to reference the NTDirect.dll located in the C:\WINDOWS\system32 folder but I got an error from Visual Studio 2010...

and this works fine with simulated data feed connection but not for IB, is this helpful?

Thanks againg
joanNT is offline  
Reply With Quote
Old 02-15-2011, 04:49 PM   #7
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

I'm not sure why it's not working for you. I'd be happy to take a look my end to compare. You can share here or send to support@ninjatrader.com. Would need everything required to run your custom app as well.
NinjaTrader_RyanM is offline  
Reply With Quote
Old 02-16-2011, 01:56 AM   #8
joanNT
Senior Member
 
Join Date: Feb 2010
Posts: 128
Thanks: 0
Thanked 0 times in 0 posts
Default

I've just sent an email.

Thanks
joanNT is offline  
Reply With Quote
Old 02-16-2011, 04:10 AM   #9
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,395
Thanks: 252
Thanked 968 times in 951 posts
Default

Thanks - we'll look for it and get back to you.
NinjaTrader_Bertrand is online now  
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
Account connection NT to IB, missing IB provider Datha Connecting 7 01-19-2011 03:18 AM
NT not connecting to IB account? rhobbo1 Connecting 2 02-13-2008 10:50 PM
Issues when NT try connecting with IB..... Angel Connecting 2 12-28-2007 06:29 AM
Connecting to CME Floor with IB and NT? dendy Connecting 6 06-21-2007 11:32 AM
Q: Where did the help file for NinjaTrader API go? (Has API support been discontinued?) Larsen General Programming 4 12-08-2006 05:23 PM


All times are GMT -6. The time now is 04:56 AM.