/// <summary> /// ConnectionStatusUpdate callback. /// Give feedback to the user that there was an issue starting up and connecting to XT. /// </summary> void ttapiInstance_ConnectionStatusUpdate(object sender, ConnectionStatusUpdateEventArgs e) { if (e.Status.IsSuccess) { m_marketList = new List <MarketListViewItem>(); m_feedList = new List <FeedListViewItem>(); // Multiple instruments can be opened in the propery window at the same time. // We need to keep track of all subscriptions to properly cleanup if needed. m_instrumentCatalogSubscriptionList = new Dictionary <Product, InstrumentCatalogSubscription>(); // Init the windows. initWindowViews(); // Attach to the MarketsUpdated event. m_marketCatalog = m_TTAPI.Session.MarketCatalog; m_marketCatalog.MarketsUpdated += new EventHandler <MarketCatalogUpdatedEventArgs>(marketsUpdated); // Start the order and fill feeds so that they will be displayed in the "Market Feed Status" window. m_TTAPI.StartOrderFeed(); m_TTAPI.StartFillFeed(); } else { MessageBox.Show(String.Format("ConnectionStatusUpdate: {0}", e.Status.StatusMessage)); } }
/// <summary> /// ConnectionStatusUpdate callback. /// Give feedback to the user that there was an issue starting up and connecting to XT. /// </summary> void ttapiInstance_ConnectionStatusUpdate(object sender, ConnectionStatusUpdateEventArgs e) { if (e.Status.IsSuccess) { m_marketList = new List<MarketListViewItem>(); m_feedList = new List<FeedListViewItem>(); // Multiple instruments can be opened in the propery window at the same time. // We need to keep track of all subscriptions to properly cleanup if needed. m_instrumentCatalogSubscriptionList = new Dictionary<Product, InstrumentCatalogSubscription>(); // Init the windows. initWindowViews(); // Attach to the MarketsUpdated event. m_marketCatalog = m_TTAPI.Session.MarketCatalog; m_marketCatalog.MarketsUpdated += new EventHandler<MarketCatalogUpdatedEventArgs>(marketsUpdated); // Start the order and fill feeds so that they will be displayed in the "Market Feed Status" window. m_TTAPI.StartOrderFeed(); m_TTAPI.StartFillFeed(); } else { MessageBox.Show(String.Format("ConnectionStatusUpdate: {0}", e.Status.StatusMessage)); } }
/// <summary> /// ConnectionStatusUpdate callback. /// Give feedback to the user that there was an issue starting up and connecting to XT. /// </summary> void ttapiInstance_ConnectionStatusUpdate(object sender, ConnectionStatusUpdateEventArgs e) { if (e.Status.IsSuccess) { this.Enabled = true; UpdateStatusBar("Total Fill Count: " + m_FillCount); // Create the Fills Subscription m_fillSubscription = new FillsSubscription(m_TTAPI.Session, Dispatcher.Current); // Subscribe to all Fill Events m_fillSubscription.FillListEnd += new EventHandler<FillListEventArgs>(m_FillSubscription_FillListEnd); m_fillSubscription.FillListStart += new EventHandler<FillListEventArgs>(m_FillSubscription_FillListStart); m_fillSubscription.FillBookDownload += new EventHandler<FillBookDownloadEventArgs>(m_FillSubscription_FillBookDownload); m_fillSubscription.FillAdded += new EventHandler<FillAddedEventArgs>(m_FillSubscription_FillAdded); m_fillSubscription.FillDeleted += new EventHandler<FillDeletedEventArgs>(m_FillSubscription_FillDeleted); m_fillSubscription.FillAmended += new EventHandler<FillAmendedEventArgs>(m_FillSubscription_FillAmended); // Start the subscription m_fillSubscription.Start(); } else { MessageBox.Show(String.Format("ConnectionStatusUpdate: {0}", e.Status.StatusMessage)); } }
/// <summary> /// ConnectionStatusUpdate callback. /// Give feedback to the user that there was an issue starting up and connecting to XT. /// </summary> void ttapiInstance_ConnectionStatusUpdate(object sender, ConnectionStatusUpdateEventArgs e) { if (e.Status.IsSuccess) { this.Enabled = true; UpdateStatusBar("Total Fill Count: " + m_FillCount); // Create the Fills Subscription m_fillSubscription = new FillsSubscription(m_TTAPI.Session, Dispatcher.Current); // Subscribe to all Fill Events m_fillSubscription.FillListEnd += new EventHandler <FillListEventArgs>(m_FillSubscription_FillListEnd); m_fillSubscription.FillListStart += new EventHandler <FillListEventArgs>(m_FillSubscription_FillListStart); m_fillSubscription.FillBookDownload += new EventHandler <FillBookDownloadEventArgs>(m_FillSubscription_FillBookDownload); m_fillSubscription.FillAdded += new EventHandler <FillAddedEventArgs>(m_FillSubscription_FillAdded); m_fillSubscription.FillDeleted += new EventHandler <FillDeletedEventArgs>(m_FillSubscription_FillDeleted); m_fillSubscription.FillAmended += new EventHandler <FillAmendedEventArgs>(m_FillSubscription_FillAmended); // Start the subscription m_fillSubscription.Start(); } else { MessageBox.Show(String.Format("ConnectionStatusUpdate: {0}", e.Status.StatusMessage)); } }
void apiInstance_ConnectionStatusUpdate(object sender, ConnectionStatusUpdateEventArgs e) { if (!e.Status.IsSuccess) { initSuccess = false; initMessage = "Login failed: " + e.Status.StatusMessage; } AppStart(); }
public void apiInstance_ConnectionStatusUpdate(object sender, ConnectionStatusUpdateEventArgs e) { if (e.Status.IsSuccess) { // add other code here to begin working with TT API } else { label1.Text = "Connection to X_TRADER failed: " + e.Status.StatusMessage; } }
/// <summary> /// ConnectionStatusUpdate callback. /// Give feedback to the user that there was an issue starting up and connecting to XT. /// </summary> void ttapiInstance_ConnectionStatusUpdate(object sender, ConnectionStatusUpdateEventArgs e) { if (e.Status.IsSuccess) { this.Enabled = true; } else { MessageBox.Show(String.Format("ConnectionStatusUpdate: {0}", e.Status.StatusMessage)); } }
/// <summary> /// Event notification for status of authentication /// </summary> public void m_apiInstance_ConnectionStatusUpdate(object sender, ConnectionStatusUpdateEventArgs e) { if (e.Status.IsSuccess) { // Add code here to begin working with the TT API } else { Console.WriteLine("TT Login failed: {0}", e.Status.StatusMessage); Dispose(); } }
/// <summary> /// ConnectionStatusUpdate callback. /// Give feedback to the user that there was an issue starting up and connecting to XT. /// </summary> void ttapiInstance_ConnectionStatusUpdate(object sender, ConnectionStatusUpdateEventArgs e) { if (e.Status.IsSuccess) { this.Enabled = true; m_customerDefaultsSubscription = new CustomerDefaultsSubscription(m_TTAPI.Session, Dispatcher.Current); m_customerDefaultsSubscription.CustomerDefaultsChanged += new EventHandler(m_CustomerDefaultsSubscription_CustomerDefaultsChanged); m_customerDefaultsSubscription.Start(); } else { MessageBox.Show(String.Format("ConnectionStatusUpdate: {0}", e.Status.StatusMessage)); } }
}//TT_XTraderInitComplete() // // ********************************************************************* // **** TT_ConnectionStatusUpdate **** // ********************************************************************* private void TT_ConnectionStatusUpdate(object sender, ConnectionStatusUpdateEventArgs eventArg) { if (eventArg.Status.IsSuccess) { this.session = m_XAPI.Session; this.session.AdminMessage += new EventHandler <AdminMessageEventArgs>(Session_AdminMessage); if (m_Log != null) { m_Log.NewEntry(LogLevel.Major, "ConnectionStatusUpdate: Login connection successful."); } OnServiceStatusChanged(new ServiceStatusChangeEventArgs(eventArg.Status.IsSuccess)); } else { if (m_Log != null) { m_Log.NewEntry(LogLevel.Error, "ConnectionStatusUpdate: Login connection for XTrader failed: " + eventArg.Status.StatusMessage); } } }//TT_ConnectionStatusUpdate()
/// <summary> /// ConnectionStatusUpdate callback. /// Give feedback to the user that there was an issue starting up and connecting to XT. /// </summary> void ttapiInstance_ConnectionStatusUpdate(object sender, ConnectionStatusUpdateEventArgs e) { if (e.Status.IsSuccess) { m_spreadDetailsList = new BindingList<MutableSpreadDetails>(); dataGridViewSpreadView.DataSource = m_spreadDetailsList; dataGridViewSpreadView.RowHeadersVisible = false; m_feedDictionary = new Dictionary<string, OrderFeed>(); m_marketCatalog = m_TTAPI.Session.MarketCatalog; m_marketCatalog.MarketsUpdated += new EventHandler<MarketCatalogUpdatedEventArgs>(m_marketCatalog_MarketsUpdated); startSpreadDetailSubscription(); updateSpreadDetailList(); } else { MessageBox.Show(String.Format("ConnectionStatusUpdate: {0}", e.Status.StatusMessage)); } }
/// <summary> /// ConnectionStatusUpdate callback. /// Give feedback to the user that there was an issue starting up and connecting to XT. /// </summary> void ttapiInstance_ConnectionStatusUpdate(object sender, ConnectionStatusUpdateEventArgs e) { if (e.Status.IsSuccess) { m_spreadDetailsList = new BindingList <MutableSpreadDetails>(); dataGridViewSpreadView.DataSource = m_spreadDetailsList; dataGridViewSpreadView.RowHeadersVisible = false; m_feedDictionary = new Dictionary <string, OrderFeed>(); m_marketCatalog = m_TTAPI.Session.MarketCatalog; m_marketCatalog.MarketsUpdated += new EventHandler <MarketCatalogUpdatedEventArgs>(m_marketCatalog_MarketsUpdated); startSpreadDetailSubscription(); updateSpreadDetailList(); } else { MessageBox.Show(String.Format("ConnectionStatusUpdate: {0}", e.Status.StatusMessage)); } }
void m_TTAPI_ConnectionStatusUpdate(object sender, ConnectionStatusUpdateEventArgs e) { if (e.Status.IsSuccess) { this.Enabled = true; // Update the Status Bar text. UpdateStatusBar("Drag a contract from X_TRADER to begin"); m_tradeSubscription = new TradeSubscription(m_TTAPI.Session, Dispatcher.Current); m_tradeSubscription.FillRecordAdded += new EventHandler <FillAddedEventArgs>(m_tradeSubscription_FillRecordAdded); m_tradeSubscription.AdminFillAdded += new EventHandler <FillAddedEventArgs>(m_tradeSubscription_AdminFillAdded); m_tradeSubscription.AdminFillDeleted += new EventHandler <FillDeletedEventArgs>(m_tradeSubscription_AdminFillDeleted); m_tradeSubscription.FillBookDownload += new EventHandler <FillBookDownloadEventArgs>(m_tradeSubscription_FillBookDownload); m_tradeSubscription.FillAmended += new EventHandler <FillAmendedEventArgs>(m_tradeSubscription_FillAmended); m_tradeSubscription.Start(); } else { MessageBox.Show(String.Format("ConnectionStatusUpdate: {0}", e.Status.StatusMessage)); } }
void m_TTAPI_ConnectionStatusUpdate(object sender, ConnectionStatusUpdateEventArgs e) { if (e.Status.IsSuccess) { this.Enabled = true; // Update the Status Bar text. UpdateStatusBar("Drag a contract from X_TRADER to begin"); m_tradeSubscription = new TradeSubscription(m_TTAPI.Session, Dispatcher.Current); m_tradeSubscription.FillRecordAdded += new EventHandler<FillAddedEventArgs>(m_tradeSubscription_FillRecordAdded); m_tradeSubscription.AdminFillAdded += new EventHandler<FillAddedEventArgs>(m_tradeSubscription_AdminFillAdded); m_tradeSubscription.AdminFillDeleted += new EventHandler<FillDeletedEventArgs>(m_tradeSubscription_AdminFillDeleted); m_tradeSubscription.FillBookDownload += new EventHandler<FillBookDownloadEventArgs>(m_tradeSubscription_FillBookDownload); m_tradeSubscription.FillAmended += new EventHandler<FillAmendedEventArgs>(m_tradeSubscription_FillAmended); m_tradeSubscription.Start(); } else { MessageBox.Show(String.Format("ConnectionStatusUpdate: {0}", e.Status.StatusMessage)); } }
/// <summary> /// ConnectionStatusUpdate /// Enable the form when successfully connected to X_Trader. /// If an error occurs display it in the status bar. /// </summary> void m_TTAPI_ConnectionStatusUpdate(object sender, ConnectionStatusUpdateEventArgs e) { if (e.Status.IsSuccess) { Enabled = true; UpdateStatusBar("Drag and Drop an instrument from the Market Grid in X_TRADER to this window."); } else { UpdateStatusBar(String.Format("ConnectionStatusUpdate: {0}", e.Status.StatusMessage)); } }
/// <summary> /// ConnectionStatusUpdate /// Enable the form when successfully connected to X_Trader. /// If an error occurs display it in the status bar. /// </summary> void m_TTAPI_ConnectionStatusUpdate(object sender, ConnectionStatusUpdateEventArgs e) { if (e.Status.IsSuccess) { m_customerDefaultsSubscription = new CustomerDefaultsSubscription(m_TTAPI.Session, m_dispatcher); m_customerDefaultsSubscription.CustomerDefaultsChanged += new EventHandler(m_customerDefaultsSubscription_CustomerDefaultsChanged); m_customerDefaultsSubscription.Start(); Enabled = true; UpdateStatusBar("Drag and Drop an instrument from the Market Grid in X_TRADER to this window."); } else { UpdateStatusBar(String.Format("ConnectionStatusUpdate: {0}", e.Status.StatusMessage)); } }