Have an indicator on say a TICK index chart expose the end result of that calculation and then have another indicator that grabs the result put that on 5 different charts say 5 min IBM, 2 Min JPM, 5Min ES, 5 Min NQ, and 2 Min DIA. So that the exposed variable of the TICK is grabbed.
I looked at various threads and I can't seem to find an example on how to do this. What I want to do is have Indicator1 below calculate once and all the other charts grabbing the results. What seems to happen is that every chart will force the indicator1 to calculate so it is being done 5 seperate times, once for each chart that is updating. I want to save on CPU and do not want Indicator1 to cycle for each seperate chart, I just want indicator1 on the TICK chart to calculate once on the ^TICK chart and all other charts to grab the result.
I'm probably doing it wrong. Can someone advise me as to how to do this properly? Also, this only exposes the last data calculated, how can I pass a Series so that I can grab data from past bars by indexing?
The best that I've come up with is:
Indicator1
In the
protectedoverridevoid Initialize()
region:
Add("^TICK",PeriodType.Second,4);
then below OnBarUpdate()
if (BarsInProgress==1)
exposedStos = Stochastics(BarsArray[1],5,3,3)[0];
Print("exposed stos of ytGVTickStos...."+exposedStos +" name"+name);
Then in the properties below that:
[Browsable(false)]
[XmlIgnore()]
publicdouble ExposedStos
{
get { Update(); return exposedStos; }
}
////////////
Indicator2 (this is the grab side of the above this goes on seperate charts mentioned abv)
double testGrab=ytGVTickStos().ExposedStos;
Print("exposed of grab side..."+testGrab+" name"+name);
"name is just there to keep track
Comment