// Received packet of historical data from TWS private static void Ibclient_HistoricalData(messages.HistoricalDataMessage hData) { // Data request is valid until HistoricalDataEnd is received. GooContract c = GetDataRequestContract(hData.RequestId, false); // Package the quote and send the data received event to the state machine. OHLCQuote quote = new OHLCQuote(hData.Date, hData.Open, hData.High, hData.Low, hData.Close); var e = new FSM_EventArgs.GooContract_With_Payload(c, quote); c.FSM.DownloadHistoricalData.FireEvent(FSM_DownloadHistoricalData.Events.HistoricalData, e); }
// Historical data processing #region Historical Data Event Handling // Received an updated historical data packet private static void Ibclient_HistoricalDataUpdate(messages.HistoricalDataMessage obj) { throw new NotImplementedException(); }