Returns a Bar object that represents a trading day whose properties for open, high, low, close, time and volume can be accessed. This bar is a virtual bar built off of the underlying data series. In some cases, the trading day bar can be used to represent a daily bar. Since this bar is virtual, its property values are calculated based on session definitions contained in the trading day only. This does not necessarily represent the actual day. You must check for a null reference since null is returned if there is insufficient intraday data to build a trading day bar.
!!! This method should ONLY be used for accessing prior trading day data. To access current trading day data, use the CurrentDayOHL() method.
Method Return Value
The properties below return double values:
The property below returns a DateTime structure:
The property below returns an int value:
Number of the trading day to get OHLCV and time information from
if (Bars.GetDayBar(1) != null)
Print("The prior trading day's close is: " + Bars.GetDayBar(1).Close.ToString());