My time zone (UTC +3:00)
Bars.GetBar return wrong bar.
Defaults:
if (State == State.SetDefaults)
{
Description = @"z";
Name = "Development";
Calculate = Calculate.OnEachTick;
IsOverlay = true;
IsAutoScale = true;
DisplayInDataBox = true;
DrawOnPricePanel = true;
DrawHorizontalGridLines = true;
DrawVerticalGridLines = true;
PaintPriceMarkers = true;
ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right;
MaximumBarsLookBack = MaximumBarsLookBack.Infinite;
//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;
AddPlot(new Stroke(Brushes.Red, 3), PlotStyle.Dot, "zzzzMax");
AddPlot(new Stroke(Brushes.Red, 3), PlotStyle.Dot, "zzzzMin");
}
DateTime start = new DateTime(2016, 08, 10, 00, 00, 01); int bar = Bars.GetBar(start); <---------- wrong answer int barsAgo = CurrentBar - bar;

Comment