public class PriceLine : Indicator { protected override void OnStateChange() { if (State == State.SetDefaults) { Description = @"Plots a horizontal line at current price."; Name = "PriceLine"; Calculate = Calculate.OnEachTick; IsOverlay = true; DisplayInDataBox = false; DrawOnPricePanel = true; DrawHorizontalGridLines = false; DrawVerticalGridLines = false; PaintPriceMarkers = false; ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right; IsSuspendedWhileInactive = false; } } protected override void OnBarUpdate() { Draw.HorizontalLine(this,"CurrentPrice", true, Close[0], Brushes.DarkGray, DashStyleHelper.DashDotDot, 1); } }
After a while, one or more horizontal lines stop updating (see the dotted line in the middle panel on the first image).
When I open the indicators panel, it appears the horizontal line that is not updating is not longer connected to a data series (see second image).
If I reload Ninjascript, everything is fine again.
Any idea what the problem is?
Comment