Closes[1][1] not returning prior day’s 16:00 close when using "US Equities RTH" in AddDataSeries()

Hi,

I’m trying to get the previous day’s 16:00 close using:
AddDataSeries(Instrument.FullName, new BarsPeriod { BarsPeriodType =
BarsPeriodType.Day, Value = 1 }, “US Equities RTH”);

Then:
double priorClose = Closes[1][1];

But this doesn’t give me the cash close at 16:00 — it looks more like the 17:00 futures session.

How can I get the true previous day 16:00 close from the daily bar?

I believe AddDataSeries with daily bars doesn’t respect the TradingHours input the way you would expect and instead reports back whatever the data provider sends as daily bars which could vary based on which data provider you utilize.

Take a look at the last column of the following link. My understanding is that data providers can adjust the closing value on daily bars.

https://ninjatrader.com/support/helpGuides/nt8/data_by_provider.htm

The way I have obtained the true cash close value in the past has been by utilizing a 1-min series and looking for the last bar of the previous cash session.

1 Like

You can only get the daily close based on the trading hours template for the instrument you’re on, And if your trading hours template says 17:00, it will be 17:00.

If you want the close at 16:00 using this same template…you would have to add an hourly data series or something and then match the timestamp Bars.GetClose(Bars.GetBar(Time))

Or you can make another template with the trading hours you want.

The close of daily bars is usually the settlement price, not the close at the end of the session. See far right column in link provided by fc77 above.

I always use 1440m bars and avoid daily bars entirely. Strangely, my recent tests show they performed faster, too. That may be scenario dependent.

AFAIK NT is not using the settlement price at all. On the old forums there was requests for this feature but not implemented