I want the calculations to be done by the logic of an indicator A and that the results can be used in another indicator B, without calculating them again, since there are common values that I want to reuse.
I did something similar to that but it doesn't work for me.
INDICATOR A:
namespace NinjaTrader.NinjaScript.Indicators
{
public class IndicatorA : Indicator
{
private Series<double> serie1;
OnStateChange()
{
serie1 = new Series<double>(this, Maximu...bars....Infinite);
}
protected override void OnBarUpdate()
{
// Calculations stored within the serie1
serie1[0] = ......;
}
#region Properties
[Browsable(false)]
[XmlIgnore()]
public Series<double> Serie1_output
{
get { return serie1; }
}
INDICATOR B:
protected override void OnBarUpdate()
{
Print(string.Format("Indicator A output = {0} ", IndicatorA().Serie1_output[0]);
}
In INDICATOR B,... I only see zeros

What is my mistake ?
Thank you in advance

Comment