Indicator two gets the indicator one object when the indicators load, but after that, any change to the exposed variable in indicator one is not reflected in indicator two.
Indicator one:
protected override void OnBarUpdate() { exposedMfe = Close[0]; exposedHasPosition = hasPosition; ... } #region Properties [Browsable(false)] // Prevents showing up on the UI property grid public double ExposedMfe { // Update() calls OnBarUpdate to ensure our exposed variable is up-to-date get { Update(); return exposedMfe; } } [Browsable(false)] // Prevents showing up on the UI property grid public bool ExposedHasPosition { get { Update(); return exposedHasPosition; } }
Indicator two:
protected override void OnBarUpdate() { if (State == State.Realtime)[INDENT]{ valMfe = MyMFE().ExposedMfe; hasPosition = MyMFE().ExposedHasPosition; }[/INDENT] }
Comment