View Full Version : Indicator on other time frame
12-06-2007, 09:30 PM
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 Bars object
Add( indicator( BarsArray,... );
But when running that, it tells me I can't use BarsArray in the Initialize method.:eek:
I have browsed the manual pages for a solution, but not been able to find one. Please help me.
12-07-2007, 12:12 AM
Unfortunately indicators only run on 1 (!) data series. Only strategies support multiple data series (which wold allow you to code your issues there).
12-07-2007, 12:23 AM
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.
12-07-2007, 12:26 AM
- unfortunately you can not cross reference indicators on different charts
- please check out SampleMultiInstrument strategy for how to work with indicators on different series
12-07-2007, 12:33 AM
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?
12-07-2007, 12:36 AM
Indicator on secondary series has the same performance impact as indicato on primary series. Just give it try.