NinjaTrader Support Forum  
X

Attention!

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


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 12-06-2007, 09:30 PM   #1
ralph.ronnquist
Junior Member
 
Join Date: Dec 2007
Posts: 10
Thanks: 0
Thanked 0 times in 0 posts
Default Indicator on other time frame

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.
ralph.ronnquist is offline  
Reply With Quote
Old 12-07-2007, 12:12 AM   #2
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Unfortunately indicators only run on 1 (!) data series. Only strategies support multiple data series (which wold allow you to code your issues there).
NinjaTrader_Dierk is offline  
Reply With Quote
Old 12-07-2007, 12:23 AM   #3
ralph.ronnquist
Junior Member
 
Join Date: Dec 2007
Posts: 10
Thanks: 0
Thanked 0 times in 0 posts
Default

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.
ralph.ronnquist is offline  
Reply With Quote
Old 12-07-2007, 12:26 AM   #4
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

- unfortunately you can not cross reference indicators on different charts
- please check out SampleMultiInstrument strategy for how to work with indicators on different series
NinjaTrader_Dierk is offline  
Reply With Quote
Old 12-07-2007, 12:33 AM   #5
ralph.ronnquist
Junior Member
 
Join Date: Dec 2007
Posts: 10
Thanks: 0
Thanked 0 times in 0 posts
Default

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?
ralph.ronnquist is offline  
Reply With Quote
Old 12-07-2007, 12:36 AM   #6
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Indicator on secondary series has the same performance impact as indicato on primary series. Just give it try.
NinjaTrader_Dierk is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -6. The time now is 10:40 PM.