![]() |
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Mar 2011
Posts: 83
Thanks: 0
Thanked 0 times in 0 posts
|
Hi,
Just trying to get familiar with the way DataSeries objects work. If I need to sync a custom dataseries I can definite by using DataSeries(this). If I add more series to the indicator, how do I sync the custom DataSeries object to the secondary series added using Add(). Hope i'm clear in what I'm asking. thanks |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Hello buylosellhi,
Yes, there is a sample dedicated to this here: http://www.ninjatrader.com/support/f...ead.php?t=3572
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Mar 2011
Posts: 83
Thanks: 0
Thanked 0 times in 0 posts
|
Ryan, thanks for your reply. In the example that you provided the secondaryDataSeries is synced using
secondarySeries = new DataSeries(SMA(BarsArray[1], 50)); do we need to use an Indicator with the appropriate BarsArray[] to sync it or can it also be synced using secondarySeries = new DataSeries(BarsArray[1]); thanks again... |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Yes, you can do that, although you might not need a data series. You can access the close series of the secondary time frame with:
Closes[1] Don't include the second bracket [ ] and it's a series, not a double.
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Member
Join Date: Jan 2010
Posts: 66
Thanks: 0
Thanked 0 times in 0 posts
|
Guys, synching the secondary series using an indicator like the SMA appears to work fine, as in the example zip file. But doing it directly via BarsArray[1], as in
secondarySeries = new DataSeries(BarsArray[1]); didn't work for me. Not a big deal... just thought I'd mention it in case others try the same thing. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Multi-Series Secondary Series LastBarPainted | TAJTrades | General Programming | 1 | 02-05-2011 12:44 PM |
| Trades Not Executing On Secondary Series In Multi-Series Strategy | BAltman | Version 7 Beta General Questions & Bug Reports | 33 | 11-03-2010 09:00 AM |
| NT7B7: DataSeries Sync to secondary bars is still broken | kdoren | Version 7 Beta General Questions & Bug Reports | 3 | 01-28-2010 02:14 PM |
| NT7B6 Strategy: DataSeries sync to secondary Bars is broken | kdoren | Version 7 Beta General Questions & Bug Reports | 4 | 01-12-2010 10:25 AM |
| Sync a DataSeries with a secondary timeframe | jriverac | Strategy Development | 14 | 05-27-2008 01:19 PM |