I have an indicator in a 5000 Volume bar chart. When the first bar closes on a new day (after midnight) I need to access the prior days OHLC data which I am trying to do by accessing daily bars:
protected override void Initialize()
{
Add(PeriodType.Day,1); // Add the daily bars to the indicator
// Other code...
}
protected override void OnBarUpdate()
{
daysback = 0;
tempDate = Convert.ToDateTime(Times[1][daysback].ToShortDateString());
yHigh = Highs[1][daysback];
yLow = Lows[1][daysback];
yClose = Closes[1][daysback];
}
The problem is that the most recent data available is not from yesterdays session, but from a day ago. For instance, right now at 2:00AM Friday morning (10/5/2012), the most recent daily bar is from 10/3/2012.
When is the daily bar from 10/4/2012 added? Can I force it to update somehow? It has not been updating, even after the market opens at 9:30 Eastern. (Pressing F5 does not help.)
This same indicator works on a 25000 Volume chart, I don't know why it's having issues with the 5000 Volume chart.
Is there a better way to access OHLC data from prior days?
Thanks,
Roger
Comment