GetDayBar
Last updated
Last updated
The function GetDayBar() outputs all values (open, high, low, close, time, median, typical, volume, and weighted) for a specified past or current day i.e. session. GetDayBar() is not intended to be used inside the chart. For this purpose, DayLinesAdv should be used instead. GetDayBar is mainly used as a high-performance replacement for .
Several data feed providers also offer historical data, in which case we recommend that you use GetDayBar. If it is intraday data that is offered, it still works adequately to use .
If the outputted data varies, the main cause is normally assumed to be the difference between Session Begin and Session End.
daysAgo Number of days in the past (0 for the current value)
DateTime for time double for all other values
For daysAgo = 0, the following applies: Close = current price (for CalculateOnClosedBar = false) Time = time of the current day’s open All other values are calculated using intraday data.
Important: The attribute TimeFrameRequirements must also always be used for the class doing the calling up (in the above example, class xy) if the indicator uses Multibars.