NinjaTrader does not correctly add a daily dataseries to an intraday series, when used with a multi-session template. Please have a look at the following simple indicator, which adds a daily data series. Now when used with my default session template for ES, this daily data series is called at the wrong moment. Actually today's close is already inserted at the beginning of today's session. Predicting the future with hindsight? Session template, indicator and chart are attached. Chart uses this session template as per instrument settings.
Indicator Code:
protected override void Initialize() { Add(new Plot(Color.Orange, PlotStyle.Line, "Yesterday's Close")); Add(PeriodType.Day,1); Overlay = true; } protected override void OnBarUpdate() { if(BarsInProgress == 0) { if (!init) Value.Set(Close[CurrentBar]); else Value.Set(close); } if (BarsInProgress == 1) { init = true; close = Close[0]; } }
Comment