For data in multiple resolutions, you can request the data with the hourly resolution (the smaller resolution) and consolidate the hourly bar into the daily bar. The documentation and the example algorithm explain data consolidation in greater details.
You can use the rolling window to save the latest consolidated daily bar data.
dailyWindow = new RollingWindow<TradeBar>(1);
The consolidated daily bar is available in the bar handler method. Each time the consolidator produces a new daily bar, this function will be called automatically. You can update the rolling window in the helper method with the new consolidated bar.
private void DailyEurUsdBarHandler(TradeBar consolidated)
{
// the consolidated daily bar
// consolidated.Open, consolidated.High, consolidated.Low, consolidated.Close
dailyWindow.Add(consolidated)
}
The slice data with the smallest resolution is available in OnData(),
public override void OnData(Slice data)
{
// daily open
dailyWindow[0].Open
// hourly open
data[symbol].Open
}
You can find the rolling window example in the documentation.