BarsRequest in Drawing tool returning empty Bars objects for some time windows

Hi, in my Drawing tool I need to request the 1 tick data for all the candles that have been selected, so between StartAnchor.Time and EndAnchor.Time. I need this to perform some calculations. I am based in Italy and my NinjaTrader platform is set to NY time. At the time of writing this message is 10:12 local time in Italy and 4:12 on the current candle of the chart. I have opened ES MAR26 with 3 days of data loaded and now I try to use my drawing tool on different groups of candles. For each day, if I select any time window between 18 and 23:59 (chart time) the request ends up returning nothing i.e. no Bars. Conversely, for any day, if I select a set of candles between 00 and 15 the request returns the expected set of bars and the computation is done smoothly. Why for some time windows the bar request is not working as expected? How can I fix this?

Please find below the code I am using to perform the request

BarsRequest = new BarsRequest(chartBars.Instrument, StartAnchor.Time, EndAnchor.Time);
BarsRequest.TradingHours = chartBars.TradingHours;
BarsRequest.BarsPeriod = new BarsPeriod() { BarsPeriodType = BarsPeriodType.Tick, Value = 1 };
BarsRequest.Request((request, errorCode, errorMessage) =>
{

}

Thank you!

I’m not sure what would cause this, but a couple thing I would try are:

  1. Verify you actually have the tick data for the times requested.
  2. Play around with using the BarsBack property instead of fixed start/end timestamps. Although that might be tough considering the non-uniform nature of tick stream timestamps.