private void DisposeSession() { _session.AccountChanged -= SessionOnAccountChanged; _session.AlgorithmicOrderPlaced -= SessionOnAlgorithmicOrderPlaced; _session.AlgorithmicOrderRegistrationComplete -= SessionOnAlgorithmicOrderRegistrationComplete; _session.OrderChanged -= SessionOnOrderChanged; _session.PositionsStatementResolved -= SessionOnPositionsStatementResolved; _session.InstrumentDOMChanged -= SessionOnInstrumentDomChanged; _session.InstrumentChanged -= SessionOnInstrumentChanged; _session.TicksAdded -= SessionOnTicksAdded; _session.IncorrectSymbol -= SessionOnIncorrectSymbol; _session.InstrumentSubscribed -= SessionOnInstrumentSubscribed; _session.ConstantVolumeBarsAdded -= SessionOnConstantVolumeBarsAdded; _session.ConstantVolumeBarsUpdated -= SessionOnConstantVolumeBarsUpdated; _session.PointAndFigureBarsAdded -= SessionOnPointAndFigureBarsAdded; _session.PointAndFigureBarsUpdated -= SessionOnPointAndFigureBarsUpdated; _session.TimedBarsAdded -= SessionOnTimedBarsAdded; _session.TimedBarsUpdated -= SessionOnTimedBarsUpdated; _session.TFlowBarsAdded -= SessionOnFlowBarsAdded; _session.TFlowBarsUpdated -= SessionOnFlowBarsUpdated; _session.DataError -= SessionOnDataError; _session.CELStarted -= SessionOnCelStarted; _session.Shutdown(); }
internal void shutDownCQGConn() { if (m_CEL != null) { m_CEL.Shutdown(); } }
public void CQG_Stop() { try { if (_cel.IsStarted) { _cel.Shutdown(); } } catch (Exception ex) { Console.WriteLine(ex.Message); } }
public CQGConnector() { _cel = new CQGCEL(); _cel.APIConfiguration.CollectionsThrowException = false; _cel.APIConfiguration.ReadyStatusCheck = eReadyStatusCheck.rscOff; _cel.APIConfiguration.TimeZoneCode = eTimeZone.tzGMT; _cel.APIConfiguration.DefaultInstrumentSubscriptionLevel = eDataSubscriptionLevel.dsQuotesAndBBA; _cel.APIConfiguration.DOMUpdatesMode = eDOMUpdatesMode.domUMDynamic; if (_cel.IsStarted) { _cel.Shutdown(); } if (!_cel.IsStarted) { _cel.Startup(); } }