I have a custom indicator attached. If I add this indicator to a chart it all works as expected, however if I try to call it from another indicator or Strategy the indicator does not seem to work.
If I try to debug with Visual Studio OnBarUpdate in the indicator does not seem to be triggered when called from another indicator or strategy but does if just run from chart.
I am using some custom data types that are stored in Generic Lists and was wondering if this had something to do with it.
Would appreciate any help.
Thanks
Mike
To Test you can try and add the following to a new Indicator
protected override void Initialize() {
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
Overlay = false;
}
protected override void OnBarUpdate() {
HiLowSwing swing = HiLowSwing(5);
Plot0.Set(swing.LastHigh.Value);
}
Comment