NinjaTrader Support Forum  

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 07-08-2012, 04:26 PM   #1
LeeMellinger
Member
 
Join Date: May 2012
Posts: 33
Thanks: 22
Thanked 0 times in 0 posts
Default MarketData Function not Updating During Market Replay

I've written a .Net app that submits orders through ATI and I'm testing it using Market Replay. The only issue I'm having is that the MarketData function appears to return that last price correctly on the first call (as per the Market Replay data), but then continues to return that same price even after Market Replay has moved on to a different price. Is there a way to force NT/ATI to return the "current" last price as per the Market Replay? It probably works fine in the live market, but it would be REALLY nice if it worked the same in Market Replay.

Thanks!

// Follow-Up #1 - The MarketData function appears to be returning 603.94 during Market Replay regardless of how many times you call it.

// Follow-Up #2 - This function returns 603.94 (for AAPL) in all cases. I even logged onto my live Interactive Brokers account and tryed it. Same result. Very strange since AAPL closed at 605.88 on Friday.
Last edited by LeeMellinger; 07-08-2012 at 04:43 PM.
LeeMellinger is offline  
Reply With Quote
Old 07-09-2012, 06:52 AM   #2
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,499
Thanks: 109
Thanked 291 times in 280 posts
Default

Hello,

Thanks for the forum post.

I'm checking on this for you will return shortly.

-Brett
NinjaTrader_Brett is offline  
Reply With Quote
The following user says thank you to NinjaTrader_Brett for this post:
Old 07-09-2012, 08:29 AM   #3
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,499
Thanks: 109
Thanked 291 times in 280 posts
Default

With your follow up 2 your saying that on a live account you are not getting the results you expect with live data from AAPL from market open? No market replay involved here?

-Brett
NinjaTrader_Brett is offline  
Reply With Quote
The following user says thank you to NinjaTrader_Brett for this post:
Old 07-09-2012, 09:45 AM   #4
LeeMellinger
Member
 
Join Date: May 2012
Posts: 33
Thanks: 22
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by NinjaTrader_Brett View Post
With your follow up 2 your saying that on a live account you are not getting the results you expect with live data from AAPL from market open? No market replay involved here?

-Brett
Fixed! - I found a post that gave me a hint and I noticed that it seems to work in debug mode in VS. You need to wait about 1/2 second (500 mls) after calling SubscribeMarketData before calling MarketData. It seems to work consistently now.
LeeMellinger is offline  
Reply With Quote
Old 07-09-2012, 09:57 AM   #5
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,499
Thanks: 109
Thanked 291 times in 280 posts
Default

Glad to hear.

-Brett
NinjaTrader_Brett is offline  
Reply With Quote
The following user says thank you to NinjaTrader_Brett for this post:
Old 07-09-2012, 10:35 AM   #6
LeeMellinger
Member
 
Join Date: May 2012
Posts: 33
Thanks: 22
Thanked 0 times in 0 posts
Default

BTW... The ATI is really an awesome feature in NT. It allows developers to create sophisticated standalone apps with functionality that cannot be developed in a Strategy. Would definitely like to see the ATI expanded...
LeeMellinger 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
Market Replay Chart not Updating TF Trader Miscellaneous Support 13 06-25-2012 07:39 AM
NTDirect.dll and MarketData function(+) greed999 Automated Trading 2 06-20-2012 06:50 PM
Market Replay function sandman Miscellaneous Support 4 06-09-2010 05:49 AM
Market Replay function freezes NT 6.5 pedroprada@bellsouth.net Connecting 1 12-01-2009 05:54 AM
Market data for market replay function grd974 Miscellaneous Support 1 05-26-2007 09:02 AM


All times are GMT -6. The time now is 11:20 PM.