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 > NinjaScript Development Support > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 09-28-2011, 06:17 PM   #1
blar58
Senior Member
 
Join Date: Jun 2010
Posts: 220
Thanks: 1
Thanked 2 times in 2 posts
Default Loading lots of data

Hi all,

I have a problem of loading time with one indicator.
This indicator needs a primary data (15 minutes) and I have to load also BidAsk data.

It means that I have to add this to the initialize method :

Code:
Add(Instrument.FullName,PeriodType.Tick,1, MarketDataType.Last);
Add(Instrument.FullName,PeriodType.Tick,1, MarketDataType.Ask);
Add(Instrument.FullName,PeriodType.Tick,1, MarketDataType.Bid);
I have to load 50 days to apply the indicator.

It takes a lot of time ... many minutes to load !

Is there a faster way to load all this data ?

Thank you
blar58 is offline  
Reply With Quote
Old 09-28-2011, 07:45 PM   #2
VTtrader
Senior Member
 
Join Date: Feb 2008
Location: www.integratedtradingtech.com
Posts: 270
Thanks: 1
Thanked 79 times in 64 posts
Default

blar58,

50 days of 1 tick data is HUGE, and you're calling it 3 times for no real reason, that I can see.
MarketDataType, is for real-time processing. You shouldn't be calling it for historical bars.

If you need 50 days worth of 1 tick data, then just call it once, that will get your data in a 1/3rd the amount of time. But don't use the MarketDataType in the call.

VT
Last edited by VTtrader; 09-28-2011 at 07:47 PM.
VTtrader is offline  
Reply With Quote
Old 09-28-2011, 09:06 PM   #3
blar58
Senior Member
 
Join Date: Jun 2010
Posts: 220
Thanks: 1
Thanked 2 times in 2 posts
Default

Thank you VTTrader for your response

But if you look at intellisense you will see that you have access
to a method : Add(Instrument, periodtype, period, marketdatatype)

What I am trying to do here is to get the historical bid, ask and last so that
I can manipulate them to get the historical delta.

Am I on the wrong path ?
blar58 is offline  
Reply With Quote
Old 09-28-2011, 11:35 PM   #4
VTtrader
Senior Member
 
Join Date: Feb 2008
Location: www.integratedtradingtech.com
Posts: 270
Thanks: 1
Thanked 79 times in 64 posts
Default

Sorry Blar58, I didn't mean to mislead you, I was thinking back in the days of NT6.5, when there wasn't the support for historical bid/ask data.

That said, 50 days is an enormous amount of tick data, just for the Last price, and the Bid/Ask series would be far larger. I'm not sure what you're trading but if it's an active instrument, that's a ton of data. Perhaps a better approach would be to calculate in smaller chunks and write/append it to a file. Then read the results of your calculations from the file.

You may also run into some alignment issues, since the bid/ask values will change more frequently than the last price, it will be tricky to sync them together accurately.

VT
VTtrader is offline  
Reply With Quote
Old 09-29-2011, 07:10 AM   #5
blar58
Senior Member
 
Join Date: Jun 2010
Posts: 220
Thanks: 1
Thanked 2 times in 2 posts
Default

Thank you VTrader

Yes I know about the sync issue.


I think that unfortunately this problem cannot be really resolved.
I would dream of the day that we can load 50 days of tick data in seconds !




Cheers
blar58 is offline  
Reply With Quote
Reply

Tags
bid/ask, loading data

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
lots of historical data causes incorrect backtest results zooinek Strategy Development 1 05-12-2010 08:32 AM
Bug: Can't Back Up NT7 w/ Lots Of Data - "Too many entries for Zip file". ChiTrader2000 Version 7 Beta General Questions & Bug Reports 2 11-13-2009 10:41 AM
Backtest question / Loading of Historical data / exceeded limit of data request Hiromichi Strategy Analyzer 5 10-09-2009 05:29 AM
Noticing lots of historical data server reconnects RichardTodd Version 7 Beta General Questions & Bug Reports 1 10-07-2009 03:32 PM
Connecting, but lots of gaps and poor data using BarChart TONY25 Connecting 7 09-01-2008 06:27 AM


All times are GMT -6. The time now is 05:01 PM.