1. The data box (Ctrl-D shortcut) stops working. If I try open the data box either by using the right click menu, the chart toolbar icon or keyboard shortcut, nothing happens. If I have tried to open the data box I can see the option selected in the right click menu, but there is no sign of the window anywhere, not even if I alt-tab through windows.
2. I have another two strategies that I load in the control center (not on any chart) that work like a signalling service. When the criteria for either of those strategies are met, they write to file (using streamwriter), flag an alert in the alerts window and send an email using the sendmail function. These two strategies will continue to work just fine, except that the sendmail function will stop working (alerts and streamwriter continue to work just fine).
I had a look in the log file but there was nothing there...the trace file on the other hand had some clues (see attached). Any help in identifying the cause of the problem would be much appreciated.
#region Variables //chart button variables private System.Windows.Forms.ToolStrip strip = null; private System.Windows.Forms.Control[] controls = null; private System.Windows.Forms.ToolStripButton btnManual = null; private Font boldFont = null; private Font regularFont = null; private bool buttonsloaded = false; #endregion protected override void OnStartUp() { System.Windows.Forms.Control[] controls = ChartControl.Controls.Find("tsrTool", false); if (controls.Length > 0) { ToolStripButton btnTemp = new System.Windows.Forms.ToolStripButton("temp"); boldFont = new Font("Arial", 8,FontStyle.Bold); regularFont = new Font("Arial", 8); btnTemp = null; btnManual = new System.Windows.Forms.ToolStripButton("btnManual"); //btnManual.Font = boldFont; btnManual.Font =regularFont ; btnManual.ForeColor = Color.White; btnManual.BackColor=Color.Green; btnManual.Text = "TRADE_"+strategy; strip = (System.Windows.Forms.ToolStrip)controls[0]; strip.Items.Add(btnManual); btnManual.Click += btnManual_Click; buttonsloaded=true; } //end if } //end OnStartUp public override void Dispose() { if (buttonsloaded==true) { strip.Items.Remove(btnManual); } } //end Dispose private void btnManual_Click(object sender, EventArgs e) { if (btnManual.Text == "TRADE_"+strategy) { //here I do all the calculations to work out my position size and place a trade and it works just fine (i.e. orders have executed as intended in live trading) } //end if text == trade btnManual.Enabled = true; } //end btnManual_Click
Comment