![]() |
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
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Jun 2010
Posts: 220
Thanks: 1
Thanked 2 times in 2 posts
|
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); It takes a lot of time ... many minutes to load ! Is there a faster way to load all this data ? Thank you |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Feb 2008
Location: www.integratedtradingtech.com
Posts: 270
Thanks: 1
Thanked 79 times in 64 posts
|
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.
|
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jun 2010
Posts: 220
Thanks: 1
Thanked 2 times in 2 posts
|
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 ? |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Feb 2008
Location: www.integratedtradingtech.com
Posts: 270
Thanks: 1
Thanked 79 times in 64 posts
|
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 |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Jun 2010
Posts: 220
Thanks: 1
Thanked 2 times in 2 posts
|
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 |
|
|
|
![]() |
| Tags |
| bid/ask, loading data |
| Thread Tools | |
| Display Modes | |
|
|
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 |