![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM 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 |
|
Junior Member
Join Date: Dec 2007
Posts: 10
Thanks: 0
Thanked 0 times in 0 posts
|
How do I apply an indicator to a secondary time frame chart? I thought
it was merely to do it like the following pseudo code: Add(other time frame); // becoming the BarsArray[1] Bars object Add( indicator( BarsArray[1],... ); But when running that, it tells me I can't use BarsArray in the Initialize method. ![]() I have browsed the manual pages for a solution, but not been able to find one. Please help me. |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Unfortunately indicators only run on 1 (!) data series. Only strategies support multiple data series (which wold allow you to code your issues there).
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Dec 2007
Posts: 10
Thanks: 0
Thanked 0 times in 0 posts
|
Hmm; I did try this within a strategy.? My logic involves one indicator on the main chart, and another indicator on a secondary chart. Basically it involves two charts with separate indicators that I want to read off and combine through this magic formulae.
|
|
|
|
|
|
#4 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
- unfortunately you can not cross reference indicators on different charts
- please check out SampleMultiInstrument strategy for how to work with indicators on different series
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Dec 2007
Posts: 10
Thanks: 0
Thanked 0 times in 0 posts
|
Thanks. Good. Right. So I just apply the secondary chart indicator on the fly. I assume this primarily means that my strategy does not receive events from the secondary indicator, which is totally fine.
But, are there performance implications? E.g., is the secondary indicator re-created for each usage? |
|
|
|
|
|
#6 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Indicator on secondary series has the same performance impact as indicato on primary series. Just give it try.
Dierk
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Query the Time Frame? | VagyokC4 | Strategy Development | 2 | 10-27-2007 10:31 AM |
| Time Frame Question | bwarner | Automated Trading | 1 | 08-01-2007 11:20 PM |
| Custon Indicator and multi-time frame | scjohn | Strategy Development | 1 | 06-08-2007 11:34 PM |
| Minute Time Frame Indicators in a TickTime Frame strategy | Nathamus | General Programming | 5 | 04-10-2007 02:41 AM |
| Backtest > Time frame | sdooley | Strategy Analyzer | 3 | 03-22-2007 07:52 AM |