Hi,

I have a minute bar strategy, that retrieve previous daily trade bar with help of History function and then open a deal at Market open time with help of MarketOnOpenOrder function. In my LEAN project everything works fine, but in web-platform it doesn't. I noticed, that daily bar open price doesn't match the open market price (at 9:30). To prove it I created simple strategy, that find the minute trade bar, open price of witch matches open price of daily bar (I retrieve daily bar with help of History function).  And It doesn't find any appropriate minute trade bar at market open (at 9:30).  

Why open price of daily bar doesn't match open price of the first minute trade bar at market open time?

I attached the code of that test strategy.

Thanks in advance.

namespace QuantConnect { class TestHistoryStrategy : QCAlgorithm { string m_Ticker = "SPY"; List<TradeBar> m_TradeBarList = new List<TradeBar>(); public override void Initialize() { SetCash(30000); //Set start date and end date SetStartDate(2013, 10, 07); SetEndDate(2013, 10, 11); AddEquity(m_Ticker, Resolution.Minute, null, true, 0, true); } public override void OnData(Slice slice) { TradeBars a_TradeBars = slice.Bars; Symbol a_Symbol= QuantConnect.Symbol.Create(m_Ticker, SecurityType.Equity, Market.USA); if (a_TradeBars.ContainsKey(a_Symbol)) { m_TradeBarList.Add(a_TradeBars[a_Symbol]); } if (Time.Hour == 9 && Time.Minute == 30) { IEnumerable<Data.Market.TradeBar> bars = History(a_Symbol, 1, Resolution.Daily); List<TradeBar> a_HistoryBarList = bars.ToList(); if (a_HistoryBarList.Count == 1) { TradeBar a_HistoryDailyBar = a_HistoryBarList[0]; foreach (TradeBar a_BarFromList in m_TradeBarList) { if (a_BarFromList.Time.Day == a_HistoryDailyBar.Time.Day && a_BarFromList.Open == a_HistoryDailyBar.Open) { Log("Canndle with the daily open price for the date "+a_HistoryDailyBar.Time.ToShortDateString()+":"); Log("Open=" + a_BarFromList.Open.ToString() + " Close=" + a_BarFromList.Close.ToString() + " StartTime=" + a_BarFromList.Time.ToString() + " EndTime=" + a_BarFromList.EndTime.ToString()); } } } } } } }