View Full Version : External Data Feed - not saved in NT database
ofurbaldur
07-08-2007, 04:58 PM
Hi
I am using external data feed options as real-time datafeed.
I am getting the values into Ninja Trader but the problem I have is that NinjaTrader does not record and save the data in the local database.
If I have say a 10 tick bars and have some bars on the charts then go and change the interval to 20 ticks the chart starts empty, same goes for interval bars.
Should Ninja Trader not record those values?
Any ideas why NT is not saving the data in the local database?
StinkiePhish
07-08-2007, 05:49 PM
You may be using the wrong methods, as I did the first time I tried to do this.
Here's my post and solution: http://www.ninjatrader-support.com/vb/showthread.php?t=1963
Bottom line, only "Last" data is stored in NT's database and *not* "Bid" nor "Ask".
ofurbaldur
07-08-2007, 07:20 PM
Thanks guys
My charts already update from the external data feed. My problem is after say running my feed for 10 minutes and have say like 10 x 1 minute bars, if I now change the interval to 2 minute bars my chart will come empty (like when u open a new chart) and it starts building bars again from my datafeed, so it is like the data is not getting recorded to the NT database.
I am sending this data as last and it already shows on the chart just data gets lost when I change the interval.
Thanks
Baldur
NinjaTrader_Dierk
07-08-2007, 11:13 PM
Please provide a step by step scenario to reproduce your issue.
BTW: No need to post your issue on multiple posts. http://www.ninjatrader-support.com/vb/showthread.php?t=1963
ofurbaldur
07-09-2007, 08:33 AM
Thanks for your reply.
I did one of my reply in the wrong thread.
First I have my datafeed setup. I use the last method of the dll to send the data to NT.
I do connect in NT and get connected to the external datafeed.
I open a chart, it starts updating.
I then change the interval the charts becomes blank (like a new chart) and it starts updating but it has not got the data from the interval I had earlier so like it is not recording the values into the local database.
This is what I use:
Private Declare Function Last Lib "NTDirect.dll" (ByVal Instrument As String, ByVal Price As Double, ByVal size As Integer) As Integer
Does this help?
Baldur
NinjaTrader_Dierk
07-09-2007, 09:15 AM
Please make sure you have Tools->Options->Data->Store real-time bar data checked.
ofurbaldur
07-09-2007, 09:18 AM
Got that option checked.
The data gets stored for other data feeds, like esignal, dtniq and ib.
Just not the external one.
Thanks
Baldur
NinjaTrader_Dierk
07-09-2007, 09:20 AM
Sorry, I can't reproduce. It works fine with TradeStation here. I suggest checking your custom script.
ofurbaldur
07-09-2007, 09:28 AM
Alright IC
Are you using version 6.0.1000.3?
Like I said it works for esignal, dtniq and IB, I can not test with tradestation as I do not have an account with them.
You do not have to specify in the DLL connection that the data should be saved to database?
I am using a SIM license could that be the reson?
Have you got any idea what I should try? Other than reinstall NT.
Thanks
Baldur
NinjaTrader_Dierk
07-09-2007, 09:31 AM
I tested on 6.0.1000.3 using the SIM key no problem. There is no need to specify anything to save the data. I'm out of ideas.
NinjaTrader_Ray
07-09-2007, 09:37 AM
To double check, you are setting the "last" price not only bid/ask through the DLL, correct? NT only saves last trade data not bid/ask.