I think I've found a bug with the NT draw function when bars have the exact same timestamp.
To reproduce the bug, load the CL 05-16 with a 6 range bartype, and display the 24th of Mars 2016. At 11:59 EST, there is a succesion of bars with the exact same timestamp (to the ms). On this particular bar, it seems that the draw function doesn't plot the object at the correct bar (see image).
Create an indicator which draw a dot on each bar, load the indicator on the chart and see the result (image below). If you reload the chart, it works fine. If you open the dataseries window and load a different number of days, then the problem appears again.
Important, you need to put the indicator at the top position in the indicator list. Otherwise you won't see the bug.
If it's not clear, I can send a short video to the support. Here is the code
protected override void OnStateChange() { if (State == State.SetDefaults) { Description = @"Enter the description for your new custom Indicator here."; Name = "TESTCode"; Calculate = Calculate.OnBarClose; IsOverlay = false; DisplayInDataBox = true; DrawOnPricePanel = true; DrawHorizontalGridLines = true; DrawVerticalGridLines = true; PaintPriceMarkers = true; ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right; //Disable this property if your indicator requires custom values that cumulate with each new market data event. //See Help Guide for additional information. IsSuspendedWhileInactive = true; } else if (State == State.Configure) { } } protected override void OnBarUpdate() { if(Time[0].CompareTo(new DateTime(2016,03,24,16,53,00))>0 && Time[0].CompareTo(new DateTime(2016,03,24,17,02,00))<0) { Draw.Dot(this, CurrentBar.ToString(), true, 0, High[0] + 2 * TickSize, Brushes.Lime); } }
Comment