![]() |
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
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Jun 2007
Posts: 112
Thanks: 0
Thanked 0 times in 0 posts
|
Hi, I'm trying to create a multiple time frame dynamically. Essentially what I want to do is, depending on the current time frame of the chart, I would like to create a second time frame say 5 times the current one which is a 3 minute chart.
In the initialize method, I have Add(BarsPeriod.Id, 5 * BarsPeriod.Value); I have also tried to pull out that multiplication and have it done prior to passing it into the Add function, but when I print out in BarsInProgress == 1, I call the function Print(BarsArray[1].Period) and it shows up as 5. Is it possible to dynamically change the value for Add or do I have to pass in a constant? Any help appreciated. |
|
|
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Multiple charts with different times frames. | rmmsmh | Charting | 10 | 04-12-2009 11:49 PM |
| Multiple time frames | Oli | Charting | 4 | 06-26-2008 02:11 AM |
| Using multiple time frames from days into minutes | Sidhartha | General Programming | 2 | 04-12-2008 04:34 AM |
| time frames | knightrider123 | Market Analyzer | 2 | 07-11-2007 01:09 AM |
| Dynamic base pointer or time reference for secondary time interval | ct | Strategy Development | 11 | 06-20-2007 02:27 PM |