NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > Application Technical Support > Charting

Charting Support for NinjaTrader Advanced Charting.

Reply
 
Thread Tools Display Modes
Old 10-13-2007, 10:00 AM   #1
whitmark
Certified NinjaScript Consultant
 
Join Date: Nov 2005
Location: Virginia, USA
Posts: 441
Thanks: 0
Thanked 12 times in 7 posts
Send a message via Skype™ to whitmark
Default External Data Feed to drive Ninja Chart

Can the External Data Feed be used to drive a Ninja Chart? I am pushing bid, ask, last playback to Ninja and have notice that tick bars will print but second bars will not. Any thoughts?

Thanks,

Whitmark
whitmark is offline  
Reply With Quote
Old 10-13-2007, 10:53 AM   #2
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

>> Can the External Data Feed be used to drive a Ninja Chart?
Absolutely

Do minute bars work? Then second bars should work as well.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 10-19-2007, 11:59 PM   #3
whitmark
Certified NinjaScript Consultant
 
Join Date: Nov 2005
Location: Virginia, USA
Posts: 441
Thanks: 0
Thanked 12 times in 7 posts
Send a message via Skype™ to whitmark
Default

Dierk,

Finally had time to followup this one up. Although I routinely push ticks from NeoTicker to Ninja to drive the DOMs, I hadn't tried to drive charts until recently. In the attached exhibit you will find examples where it appears the DOM is working propertly but the charts 1) don't break the time bars appropriately and 2) don't update the time axis correctly for tick and time bars. I thought it might be the datetime stamp I was passing, so I outputed the values and they look fine.

Listed below are the function declarations that I have always used from within a Neo indicator using Delphi.

Quote:
Function LastPlayback( Symbol: string; Price: Double; Size: Integer; Timestamp: string ): integer; stdcall; external 'NtDirect.dll';
Function AskPlayback( Symbol: string; Price: Double; Size: Integer; Timestamp: string ): integer; stdcall; external 'NtDirect.dll';
Function BidPlayback( Symbol: string; Price: Double; Size: Integer; Timestamp: string ): integer; stdcall; external 'NtDirect.dll';
Any thoughts as to why the Ninja charts don't seem to pick up on the datetime stamp?

Thanks,

Whitmark
Attached Images
File Type: jpg NeoToNinjaPlayback.jpg (91.2 KB, 186 views)
whitmark is offline  
Reply With Quote
Old 10-20-2007, 06:06 AM   #4
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Unfortunately I can't read the important details of your screenshot. I would not know what causes that issue. The only advise I could give you is strictly following the documented timestamp formatting "yyyyMMddhhmmss" and making sure there are no leading or trailing spaces.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 10-20-2007, 06:09 AM   #5
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Here is another idea: if you are submitting timestamps smaller than the last bar on chart, then of course all data is added to this last bar.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 10-20-2007, 08:48 AM   #6
whitmark
Certified NinjaScript Consultant
 
Join Date: Nov 2005
Location: Virginia, USA
Posts: 441
Thanks: 0
Thanked 12 times in 7 posts
Send a message via Skype™ to whitmark
Default

Hi Dierk,

Thanks for your thoughts. I've verified that the datetimestamp format is correct with no leading or trailing spaces. Given the options I have to format a chart:

> Days back
> Bars back
> Start and Last date

Its not clear to me how I could playback historical data if under the "Days back" and "Bars back" settings, as it would seem that the last bar is set to the current datetime and as you say, I would be submitting smaller (earlier) timestamps than the one on the last bar.

Alternatively, I could use the "Start and Last date" option. But setting the Last date to a timestamp to the day before or the day after my historical data or does not seem to work either.

Keep in mind, that under all of these scenarios, the DOM correctly shows the bid, ask, and last price/size changing tick-by-tick and correctly applies the proper historical datetime stamps to orders and executions.

Is there a way to configure the chart to allow a historical external data feed to populate a chart correctly and with the proper data backfill from Ninja? Could it be that the ATI playback functions really only supports realtime data push for charts and not historical data push as their function names would suggest? Does this work with the eSignal data replay?

Thanks for your help on this.

Regards,

Whitmark
whitmark is offline  
Reply With Quote
Old 10-20-2007, 10:56 AM   #7
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

>> But setting the Last date to a timestamp to the day before or the day after my historical data or does not seem to work either.
Why? Then you've got no chart data for the replay date - which is fine - and replay should work as expected, provided the timestamps are formatted correctly.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 10-20-2007, 01:14 PM   #8
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

Hi whitmark,

It should work. I've been using it on my end here for a while now. What you need to do is set back your system clock to the date before the replay date. I know thats a hassle right now, but it seems to be the only workaround. What's nice is you can actually increase your replay speed from the Neoticker Sim Server and I believe you won't face the race conditions you would normally face when using NinjaTrader's normal replay feature. The caveat to this method is it gets quite CPU intensive if you try to drive NinjaTrader at 500x. Especially the DOM, it takes awhile to catch up, but at least it works and any NinjaScript strategy you are testing enters and fills as it would if you were just running at 1x speed (or at least thats what I have been able to discern so far).

http://www.ninjatrader-support.com/v...ight=neoticker

Last edited by NinjaTrader_Josh; 10-20-2007 at 01:24 PM.
NinjaTrader_Josh is offline  
Reply With Quote
Old 10-20-2007, 03:04 PM   #9
whitmark
Certified NinjaScript Consultant
 
Join Date: Nov 2005
Location: Virginia, USA
Posts: 441
Thanks: 0
Thanked 12 times in 7 posts
Send a message via Skype™ to whitmark
Default

Bravo Josh! Thank you. I vaguely recall reading the system clock resetting requirement now that you mention it. It's interesting to note that it really isn't an issue for the DOMs but it is for the Charts. You're right, it is a hassle and I would add with limitations that run contrary to the spirit of the playback functions. Given the nature of the ATI, I can't see how this is an issue specific to NeoTicker and suspect it will not work for eSignal replay or any other historical replay without resetting the clock.

Ray/Dierk . . . what say you regarding an enhancement to allow historical playback without the need to reset the sytem clock. Thanks for your consideration.

Regards,

Whitmark
whitmark is offline  
Reply With Quote
Old 10-21-2007, 04:17 AM   #10
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Thanks for your suggestion. We'll look into.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 02-19-2008, 07:41 AM   #11
whitmark
Certified NinjaScript Consultant
 
Join Date: Nov 2005
Location: Virginia, USA
Posts: 441
Thanks: 0
Thanked 12 times in 7 posts
Send a message via Skype™ to whitmark
Default

Has there been any new developments or workarounds identified in versions 6.0 or 6.5 to allow Ninja Charts to be driven with a historical external datafeed without the need to reset the system clock as advocated by Josh.

Thanks,

Whitmark
whitmark is offline  
Reply With Quote
Old 02-19-2008, 07:51 AM   #12
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

I don't recall at this time. I suggest retrying based on latest NT 6.5 beta or browsing the release notes.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 02-20-2009, 01:50 PM   #13
trader_rick
Member
 
Join Date: Dec 2007
Posts: 87
Thanks: 0
Thanked 0 times in 0 posts
Default

Hello,

In response to the last post I can confirm that timestamps in charts under NT6.5 still appears to be broken.

Specifically - I can send ticks to NT and they are picked up fine in a chart. The timestamps however are not. This in itself would not mean the end of the world were it not for the fact that each time you run the same time series through the chart you also get a slightly different output owing to the chart parsing the data into bars in an inconsistent fashion. This then means that you cannot run the same indicator on the same time series and get the same result.

I know you guys probably have a list of bugs to fix/changes to make longer than all our arms put together but this one has been there for a while now. I suppose you are judging this by the fact that only one other person has commented on it and therefore it's not urgent. There's nothing much I can say to that - other than to repeat it is not currently possible to consistently test one's custom indicator (derived from highs, lows, opens and closes) without fixing this issue.

Is there any feedback you can give on this?

many thanks in advance

P.S. there is, however, no need to reset the system clock. Mine accepts data just fine with the clock as is.
trader_rick is offline  
Reply With Quote
Old 06-05-2009, 10:27 PM   #14
Gains
Member
 
Join Date: Mar 2007
Location: Minnesota,USA
Posts: 95
Thanks: 0
Thanked 0 times in 0 posts
Default

I am experimenting with a tick server that drives Ninja beautifully. I am having it coded and it is still a work in progress but there are no issues with the timestamps at all. The bars build the same way with every pass through the data and the time stamps on the charts are correct.
I feed Ninja ticks and it builds tick or minute charts just fine. I do have to delete any historical data for the symbol from Ninja first of course for this to work. This is no big deal especially if you make up unique instrument names for back testing use only.

Anyway the real problem I am having is with "race conditions" that I guess are similar to this...

Quote:
Originally Posted by NinjaTrader_Josh View Post
Hi whitmark,

It should work. I've been using it on my end here for a while now. What you need to do is set back your system clock to the date before the replay date. I know thats a hassle right now, but it seems to be the only workaround. What's nice is you can actually increase your replay speed from the Neoticker Sim Server and I believe you won't face the race conditions you would normally face when using NinjaTrader's normal replay feature. The caveat to this method is it gets quite CPU intensive if you try to drive NinjaTrader at 500x. Especially the DOM, it takes awhile to catch up, but at least it works and any NinjaScript strategy you are testing enters and fills as it would if you were just running at 1x speed (or at least thats what I have been able to discern so far).
With the experimental server I can drive Ninja at 1000x. This surprisingly works great for drawing charts but it destroys the internal Ninja order server simulator. The entries and exits are made but they can have huge "slippage on steroids". When Ninja finally does catch up and post the trades on the chart I see that I got entries that are no where near reality with partial fills spanning 20 to 30 pip ranges.
I need to run at 1000x since I am looking at years of data and 12 to 24 hour charts. Is there any hope for changes in the order simulator in the 7 beta?
For now I am using StreamWriters in my scripts to do my own order and performance logging but if the Ninja Sim account could keep up that would certainly be much more elegant.

I am wondering what do users like Whitmark do to work around this issue. Simply run replays slower? That's no fun!

Thanks,
Gains
Gains is offline  
Reply With Quote
Old 06-07-2009, 11:47 AM   #15
Trader.Jon
Senior Member
 
Join Date: Dec 2008
Posts: 338
Thanks: 0
Thanked 0 times in 0 posts
Default

Gains,

I am curious, how big is your NinjaTrader.mdb file? Mine seems to peak out at about 2,095,000 kb (approximately 800 million lines of tick data before NT refuses to add any more data).

Thanks!
TJ
Trader.Jon 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 connection readgetpaid Connecting 1 09-07-2007 08:43 AM
External Data Feed - not saved in NT database ofurbaldur Connecting 10 07-09-2007 09:37 AM
External Data Feed with existing Chart shawnj Connecting 0 06-16-2007 09:17 AM
external data feed riccja Connecting 2 05-01-2007 04:37 AM
problems with external data feed from TS vladkgb Connecting 7 04-20-2006 02:44 AM


All times are GMT -6. The time now is 01:16 AM.