![]() |
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Nov 2010
Posts: 21
Thanks: 6
Thanked 0 times in 0 posts
|
Hi guys.
Is there a way to reference the time frame chosen in a strategy? I need it so I can create my secondary bars time-frame as I work in multiples of 3. For example if primary bars is selected as 1500 tick then secondary bars needs to be 500 tick. For example what I am trying to do is this. Initialize { eg. Add(PeriodType.Tick.PrimaryBars / 3); } Thanks Ash |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,564
Thanks: 261
Thanked 1,015 times in 996 posts
|
Hi Ash, unfortunately we could not support the dynamic addition of series - you can query the series you're working with over the BarsPeriod.Id and Value, however only outside of Initialize().
For your need, I would create custom inputs for the series to load, so the user sets the timeframe to a third as needed via the input.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Nov 2010
Posts: 21
Thanks: 6
Thanked 0 times in 0 posts
|
Cheers for the response Bertrand. Good idea, I will just create user inputs for the time frames as suggested.
Thanks Ash |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Referencing DataSeries with multi timeframe indicators | trader2be | General Programming | 5 | 01-06-2011 06:35 AM |
| Multi-timeframe strategy skips lower timeframe bars at one point | adamus | Version 7 Beta General Questions & Bug Reports | 13 | 07-03-2010 01:36 AM |
| Multi-timeframe indicator referencing | LazKz | Strategy Development | 3 | 03-18-2009 07:24 AM |
| How to get higher timeframe data to make entry decision at lower timeframe? | cunparis | Strategy Development | 1 | 03-11-2009 12:41 PM |
| Referencing DataSeries elements in Multi-timeframe Strategies | dbw451 | Strategy Development | 2 | 09-06-2008 09:17 AM |