PDA

View Full Version : How to load 10 days and intraday data and 3 month of daily?


tealover007
02-05-2010, 10:40 PM
I wish I could have 3 month of tick data, but I don't. But I certainly have 3 month of daily.

I was wondering is there any way of having access to both from the same strategy?

NinjaTrader_Austin
02-06-2010, 10:26 AM
TeaLover007, I'm not sure I understand your question. You can add (http://www.ninjatrader-support.com/HelpGuideV6/Add1.html) a 1 tick dataseries to your strategy like this:

Initialize()
{
// Add(PeriodType periodType, int period)
Add(PeriodType.Tick, 1);
}

tealover007
02-06-2010, 09:45 PM
I need to load 3 month of daily data to a strategy. Following your example, I'd do it like that:

Add(PeriodType.Day, 1);

Then on a next line I'd put:

Add(PeriodType.Tick, 1);


So far so good. However. Instead of 3 month daily, my strategy will call OnUpdateBar() ONLY for the period of time I have corresponding data for intraday/ticks. So instead of 3 month I will have 10 days.

I am missing 2 month and 20 days of data. It is OK for me to don't have corresponding ticks for this period for this particular strategy. But it's essential to have these missing 2 month and 20 days (AND ticks as well. As much as the data provider will give me or how much I have stored).


How to have access to these 2 month and 20 days?

NinjaTrader_Austin
02-07-2010, 01:34 PM
tealover007, you just need to apply the strategy that has that much data loaded on it for the strategy to read all those ticks. You can create a chart that spans those three months and then add the strategy to that chart, and it will have access to all three months of data.