![]() |
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Jan 2009
Posts: 216
Thanks: 0
Thanked 1 time in 1 post
|
NJ experts,
I have a multiple time frame issue: I could not add Daily data series to minute data series. In my case, the primary chart is 1 minute. I have no problem in adding another minute data series of different period, no problem in adding second and tick data series. But When i add day series and above, the program will not work. The compiling will be successful, though, without any error message. I have simplified the issue in the following code. No variable is declared so this one can be tested by copy and paste. Any comments/suggestions are welcome. protectedoverridevoid Initialize() { //Add(PeriodType.Minute, 60); //Add(PeriodType.Second, 30); //Add(PeriodType.Tick, 30); Add(PeriodType.Day, 2); // BarsInProgress == 1. BarsArray[1] CalculateOnBarClose = false; } protectedoverridevoid OnBarUpdate() { if (Close[1]>Close[2]) { Print("Data series 0 value is" + ATR(1)[0].ToString()); Print("Data series 1 value is" + ATR(BarsArray[1],1)[0].ToString()); } } |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
binwang2,
Are you making an indicator or a strategy? Multi-series indicators is currently not available. You can only do this in a strategy.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jan 2009
Posts: 216
Thanks: 0
Thanked 1 time in 1 post
|
I am doing it in a strategy.
No error message in compliling. But as long as it is at day level (week is the same), there will be no output. |
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
binwang2,
Please be sure you have enough data on all series. For daily bars you need to have at least 20 days.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Jan 2009
Posts: 216
Thanks: 0
Thanked 1 time in 1 post
|
Changed default settings to include at least 35 days of data. It works. Thanks.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| New Data Series | nigeleyre | Strategy Development | 1 | 01-23-2009 03:45 PM |
| Data Series | nigeleyre | Strategy Development | 3 | 01-07-2009 02:33 PM |
| data series | argito | Indicator Development | 3 | 05-30-2008 11:06 PM |
| How to access daily data series from an indicator running on intraday charts? | clearpicks | Indicator Development | 3 | 04-21-2008 06:57 AM |
| Pivot Series | wagross | Charting | 1 | 02-09-2006 07:36 AM |