/// <summary> /// Upon the application form loading, the TTDropHandler, TTOrderSet, and TTInstrNotify /// objects are initialized, and the required events are subscribed. /// </summary> public frmOrderUpdate() { InitializeComponent(); // Instantiate the TTDropHandler class. m_TTDropHandler = new XTAPI.TTDropHandlerClass(); // Register the active form for drag and drop. m_TTDropHandler.RegisterDropWindow((int) this.Handle); // Subscribe to the OnNotifyDrop event. m_TTDropHandler.OnNotifyDrop += new XTAPI._ITTDropHandlerEvents_OnNotifyDropEventHandler(this.m_TTDropHandler_OnNotifyDrop); // Instantiate the TTInstrNotify class. m_TTInstrNotify = new XTAPI.TTInstrNotifyClass(); // Subscribe to the OnNotifyFound event. m_TTInstrNotify.OnNotifyFound += new XTAPI._ITTInstrNotifyEvents_OnNotifyFoundEventHandler(this.m_TTInstrNotify_OnNotifyFound); // Instantiate the TTOrderSet class. m_TTOrderSet = new XTAPI.TTOrderSetClass(); // Enable reject events m_TTOrderSet.EnableOrderRejectData = 1; // Set normal level of detail in our order status events m_TTOrderSet.OrderStatusNotifyMode = XTAPI.enumOrderStatusNotifyMode.ORD_NOTIFY_NORMAL; // Subscribe to the order status update events m_TTOrderSet.OnOrderDeleted += new XTAPI._ITTOrderSetEvents_OnOrderDeletedEventHandler(m_TTOrderSet_OnOrderDeleted); m_TTOrderSet.OnOrderFilled += new XTAPI._ITTOrderSetEvents_OnOrderFilledEventHandler(m_TTOrderSet_OnOrderFilled); m_TTOrderSet.OnOrderHeld += new XTAPI._ITTOrderSetEvents_OnOrderHeldEventHandler(m_TTOrderSet_OnOrderHeld); m_TTOrderSet.OnOrderSubmitted += new XTAPI._ITTOrderSetEvents_OnOrderSubmittedEventHandler(m_TTOrderSet_OnOrderSubmitted); m_TTOrderSet.OnOrderUpdated += new XTAPI._ITTOrderSetEvents_OnOrderUpdatedEventHandler(m_TTOrderSet_OnOrderUpdated); m_TTOrderSet.OnOrderRejected += new XTAPI._ITTOrderSetEvents_OnOrderRejectedEventHandler(m_TTOrderSet_OnOrderRejected); // Set the Net Limits to false. m_TTOrderSet.Set("NetLimits", false); }
/// <summary> /// Upon the application form loading, the TTDropHandler and TTInstrNotify objects /// are initialized, and the required events are subscribed. /// </summary> public frmProfitLoss() { // Required for Windows Form Designer support InitializeComponent(); // Instantiate the drag and drop handler class. m_TTDropHandler = new XTAPI.TTDropHandlerClass(); // Register the active form for drag and drop. m_TTDropHandler.RegisterDropWindow((int) this.Handle); // Subscribe to the drop and drag callback event. m_TTDropHandler.OnNotifyDrop += new XTAPI._ITTDropHandlerEvents_OnNotifyDropEventHandler(m_TTDropHandler_OnNotifyDrop); // Instantiate the TTInstrObj array for four TTInstrObj objects. m_TTInstrObj = new XTAPI.TTInstrObj[4]; // Instantiate the instrument notification class m_TTInstrNotify = new XTAPI.TTInstrNotifyClass(); // Subscribe to the necessary TTInstrNotify events. m_TTInstrNotify.OnNotifyFound +=new XTAPI._ITTInstrNotifyEvents_OnNotifyFoundEventHandler(m_TTInstrNotify_OnNotifyFound); m_TTInstrNotify.OnNotifyUpdate +=new XTAPI._ITTInstrNotifyEvents_OnNotifyUpdateEventHandler(m_TTInstrNotify_OnNotifyUpdate); m_TTInstrNotify.OnOrderSetUpdate +=new XTAPI._ITTInstrNotifyEvents_OnOrderSetUpdateEventHandler(m_TTInstrNotify_OnOrderSetUpdate); }
/// <summary> /// Upon the application form loading, the TTDropHandler, TTOrderSet, and /// TTInstrNotify objects are initialized, and the required events are subscribed. /// </summary> public frmModifyOrder() { // Required for Windows Form Designer support InitializeComponent(); // Instantiate the drag and drop handler class. m_TTDropHandler = new XTAPI.TTDropHandlerClass(); // Register the active form for drag and drop. m_TTDropHandler.RegisterDropWindow((int) this.Handle); // Associate the drop and drag callback event. m_TTDropHandler.OnNotifyDrop += new XTAPI._ITTDropHandlerEvents_OnNotifyDropEventHandler(this.m_TTDropHandler_OnNotifyDrop); // Instantiate the instrument notification class. m_TTInstrNotify = new XTAPI.TTInstrNotifyClass(); // Subscribe to the TTInstrNotify events. m_TTInstrNotify.OnNotifyFound += new XTAPI._ITTInstrNotifyEvents_OnNotifyFoundEventHandler(this.m_TTInstrNotify_OnNotifyFound); // Instantiate the TTOrderSet object. m_TTOrderSet = new XTAPI.TTOrderSetClass(); }
/// <summary> /// Upon the application form loading, the TTDropHandler and TTInstrNotify objects /// are initialized, and the required events are subscribed. /// </summary> public frmPriceUpdateDepth() { // Required for Windows Form Designer support InitializeComponent(); // Instantiate the drag and drop handler class. m_TTDropHandler = new XTAPI.TTDropHandlerClass(); // Register the active form for drag and drop. m_TTDropHandler.RegisterDropWindow((int) this.Handle); // Associate the drop and drag callback event. m_TTDropHandler.OnNotifyDrop += new XTAPI._ITTDropHandlerEvents_OnNotifyDropEventHandler(this.m_TTDropHandler_OnNotifyDrop); // Instantiate the instrument notification class m_TTInstrNotify = new XTAPI.TTInstrNotifyClass(); // Setup the instrument notification call back functions m_TTInstrNotify.OnNotifyFound += new XTAPI._ITTInstrNotifyEvents_OnNotifyFoundEventHandler(this.m_TTInstrNotify_OnNotifyFound); m_TTInstrNotify.OnNotifyDepthData += new XTAPI._ITTInstrNotifyEvents_OnNotifyDepthDataEventHandler(pNotify_OnNotifyDepthData); // Enable the depth updates. m_TTInstrNotify.EnableDepthUpdates = 1; // Set the Depth levels to "0" which will return all available depth. m_bidDepthValue = "BidDepth(0)"; m_askDepthValue = "AskDepth(0)"; }
/// <summary> /// Upon the application form loading, the TTDropHandler and TTInstrNotify /// objects are initialized, and the required events are subscribed. /// </summary> public frmOrderSelector() { // Required for Windows Form Designer support InitializeComponent(); // Instantiate the drag and drop handler class. m_TTDropHandler = new XTAPI.TTDropHandlerClass(); // Register the active form for drag and drop. m_TTDropHandler.RegisterDropWindow((int) this.Handle); // Associate the drop and drag callback event. m_TTDropHandler.OnNotifyDrop += new XTAPI._ITTDropHandlerEvents_OnNotifyDropEventHandler(this.m_TTDropHandler_OnNotifyDrop); // Instantiate the instrument notification class. m_TTInstrNotify = new XTAPI.TTInstrNotifyClass(); // Subscribe to the TTInstrNotify events. m_TTInstrNotify.OnNotifyFound += new XTAPI._ITTInstrNotifyEvents_OnNotifyFoundEventHandler(this.m_TTInstrNotify_OnNotifyFound); // Instantiate a TTOrderSet object for submitting orders. m_TTOrderSetSendOrder = new XTAPI.TTOrderSetClass(); m_TTOrderSetSendOrder.Set("NetLimits",false); m_TTOrderSetSendOrder.Open(1); // Instantiate the the TTOrderSelector object. m_TTOrderSelector = new XTAPI.TTOrderSelectorClass(); // Instantiate a TTOrderSet object for receiving orders. m_TTOrderSetReceiveOrder = new XTAPI.TTOrderSetClass(); m_TTOrderSetReceiveOrder.OnOrderSetUpdate += new XTAPI._ITTOrderSetEvents_OnOrderSetUpdateEventHandler(m_TTOrderSet_OnOrderSetUpdate); // Enable the TTOrderTracker and order updates. m_TTOrderSetReceiveOrder.EnableOrderUpdateData = 1; m_TTOrderSetReceiveOrder.EnableOrderSetUpdates = 1; }
/// <summary> /// Upon the application form loading, the TTDropHandler and TTInstrNotify /// objects are initialized, and the required events are subscribed. /// </summary> public frmPriceUpdateDragDrop() { // Required for Windows Form Designer support InitializeComponent(); // Instantiate the drag and drop handler class. m_TTDropHandler = new XTAPI.TTDropHandlerClass(); // Register the active form for drag and drop. m_TTDropHandler.RegisterDropWindow((int) this.Handle); // Associate the drop and drag callback event. m_TTDropHandler.OnNotifyDrop += new XTAPI._ITTDropHandlerEvents_OnNotifyDropEventHandler(this.m_TTDropHandler_OnNotifyDrop); // Instantiate the instrument notification class. m_TTInstrNotify = new XTAPI.TTInstrNotifyClass(); // Setup the instrument notification call back functions. m_TTInstrNotify.OnNotifyFound += new XTAPI._ITTInstrNotifyEvents_OnNotifyFoundEventHandler(this.m_TTInstrNotify_OnNotifyFound); m_TTInstrNotify.OnNotifyUpdate += new XTAPI._ITTInstrNotifyEvents_OnNotifyUpdateEventHandler(this.m_TTInstrNotify_OnNotifyUpdate); }