[Quantproject-developers] QuantDownloader/Downloader/TickerSelectors TickerSelectorForm.cs,1.17,1.18
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2006-01-07 11:12:41
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/TickerSelectors In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10006/Downloader/TickerSelectors Modified Files: TickerSelectorForm.cs Log Message: SelectorByCloseToOpenVolatility and SelectoByAverageCloseToOpenPerformance can now be called visually. In addition, minor changes have been made to names that appear in the combo box of the visual selector form. Index: TickerSelectorForm.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/TickerSelectors/TickerSelectorForm.cs,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** TickerSelectorForm.cs 18 Sep 2005 20:53:16 -0000 1.17 --- TickerSelectorForm.cs 7 Jan 2006 11:12:30 -0000 1.18 *************** *** 69,72 **** --- 69,74 ---- private System.Windows.Forms.Splitter splitter1; private System.Windows.Forms.CheckBox checkBoxOnlyWithAtLeastOneWinningDay; + private System.Windows.Forms.TextBox textBoxNumDaysBetweenEachClose; + private System.Windows.Forms.Label labelNumDaysBetweenEachClose; private DataTable tableOfSelectedTickers; *************** *** 82,94 **** this.comboBoxAvailableSelectionRules.Items.Add("Performance"); this.comboBoxAvailableSelectionRules.Items.Add("CloseToCloseVolatility"); this.comboBoxAvailableSelectionRules.Items.Add("CloseToOpenVolatility"); this.comboBoxAvailableSelectionRules.Items.Add("AverageCloseToClosePerformance"); this.comboBoxAvailableSelectionRules.Items.Add("CloseToCloseLinearCorrelation"); ! this.comboBoxAvailableSelectionRules.Items.Add("CloseToOpenLinearCorrelation"); this.comboBoxAvailableSelectionRules.Items.Add("AverageCloseToOpenPerformance"); this.comboBoxAvailableSelectionRules.Items.Add("QuotedAtEachMarketDay"); this.comboBoxAvailableSelectionRules.Items.Add("AverageRawOpenPrice"); this.comboBoxAvailableSelectionRules.Items.Add("WinningOpenToClose"); ! this.comboBoxAvailableSelectionRules.Items.Add("OpenCloseCorrelationToBenchmark"); } --- 84,99 ---- this.comboBoxAvailableSelectionRules.Items.Add("Performance"); this.comboBoxAvailableSelectionRules.Items.Add("CloseToCloseVolatility"); + this.comboBoxAvailableSelectionRules.Items.Add("OpenToCloseVolatility"); this.comboBoxAvailableSelectionRules.Items.Add("CloseToOpenVolatility"); this.comboBoxAvailableSelectionRules.Items.Add("AverageCloseToClosePerformance"); this.comboBoxAvailableSelectionRules.Items.Add("CloseToCloseLinearCorrelation"); ! this.comboBoxAvailableSelectionRules.Items.Add("OpenToCloseLinearCorrelation"); ! this.comboBoxAvailableSelectionRules.Items.Add("AverageOpenToClosePerformance"); this.comboBoxAvailableSelectionRules.Items.Add("AverageCloseToOpenPerformance"); this.comboBoxAvailableSelectionRules.Items.Add("QuotedAtEachMarketDay"); this.comboBoxAvailableSelectionRules.Items.Add("AverageRawOpenPrice"); this.comboBoxAvailableSelectionRules.Items.Add("WinningOpenToClose"); ! this.comboBoxAvailableSelectionRules.Items.Add("OpenToCloseCorrelationToBenchmark"); ! this.comboBoxAvailableSelectionRules.Items.Add("CloseToCloseCorrelationToBenchmark"); } *************** *** 136,139 **** --- 141,145 ---- this.panel2 = new System.Windows.Forms.Panel(); this.groupBoxSelectionRule = new System.Windows.Forms.GroupBox(); + this.checkBoxOnlyWithAtLeastOneWinningDay = new System.Windows.Forms.CheckBox(); this.textBoxMaxStdDev = new System.Windows.Forms.TextBox(); this.labelMinStdDev = new System.Windows.Forms.Label(); *************** *** 154,158 **** this.dataGrid1 = new System.Windows.Forms.DataGrid(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); ! this.checkBoxOnlyWithAtLeastOneWinningDay = new System.Windows.Forms.CheckBox(); this.panel2.SuspendLayout(); this.groupBoxSelectionRule.SuspendLayout(); --- 160,165 ---- this.dataGrid1 = new System.Windows.Forms.DataGrid(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); ! this.textBoxNumDaysBetweenEachClose = new System.Windows.Forms.TextBox(); ! this.labelNumDaysBetweenEachClose = new System.Windows.Forms.Label(); this.panel2.SuspendLayout(); this.groupBoxSelectionRule.SuspendLayout(); *************** *** 235,238 **** --- 242,247 ---- // this.groupBoxSelectionRule.Controls.AddRange(new System.Windows.Forms.Control[] { + this.labelNumDaysBetweenEachClose, + this.textBoxNumDaysBetweenEachClose, this.checkBoxOnlyWithAtLeastOneWinningDay, this.labelMaxStdDev, *************** *** 264,267 **** --- 273,286 ---- this.groupBoxSelectionRule.Text = "Single Selection rule"; // + // checkBoxOnlyWithAtLeastOneWinningDay + // + this.checkBoxOnlyWithAtLeastOneWinningDay.Enabled = false; + this.checkBoxOnlyWithAtLeastOneWinningDay.Location = new System.Drawing.Point(192, 144); + this.checkBoxOnlyWithAtLeastOneWinningDay.Name = "checkBoxOnlyWithAtLeastOneWinningDay"; + this.checkBoxOnlyWithAtLeastOneWinningDay.Size = new System.Drawing.Size(152, 24); + this.checkBoxOnlyWithAtLeastOneWinningDay.TabIndex = 38; + this.checkBoxOnlyWithAtLeastOneWinningDay.Text = "Exclude \"pure\" losers"; + this.toolTip1.SetToolTip(this.checkBoxOnlyWithAtLeastOneWinningDay, "Check if you want to filter only tickers with at least one winning day"); + // // textBoxMaxStdDev // *************** *** 311,315 **** // labelMarketIndexKey // ! this.labelMarketIndexKey.Location = new System.Drawing.Point(88, 208); this.labelMarketIndexKey.Name = "labelMarketIndexKey"; this.labelMarketIndexKey.Size = new System.Drawing.Size(96, 23); --- 330,334 ---- // labelMarketIndexKey // ! this.labelMarketIndexKey.Location = new System.Drawing.Point(16, 208); this.labelMarketIndexKey.Name = "labelMarketIndexKey"; this.labelMarketIndexKey.Size = new System.Drawing.Size(96, 23); *************** *** 320,326 **** // textBoxMarketIndex // ! this.textBoxMarketIndex.Location = new System.Drawing.Point(192, 208); this.textBoxMarketIndex.Name = "textBoxMarketIndex"; ! this.textBoxMarketIndex.Size = new System.Drawing.Size(88, 20); this.textBoxMarketIndex.TabIndex = 28; this.textBoxMarketIndex.Text = ""; --- 339,345 ---- // textBoxMarketIndex // ! this.textBoxMarketIndex.Location = new System.Drawing.Point(120, 208); this.textBoxMarketIndex.Name = "textBoxMarketIndex"; ! this.textBoxMarketIndex.Size = new System.Drawing.Size(56, 20); this.textBoxMarketIndex.TabIndex = 28; this.textBoxMarketIndex.Text = ""; *************** *** 412,424 **** this.dataGrid1.TabIndex = 2; // ! // checkBoxOnlyWithAtLeastOneWinningDay // ! this.checkBoxOnlyWithAtLeastOneWinningDay.Enabled = false; ! this.checkBoxOnlyWithAtLeastOneWinningDay.Location = new System.Drawing.Point(192, 144); ! this.checkBoxOnlyWithAtLeastOneWinningDay.Name = "checkBoxOnlyWithAtLeastOneWinningDay"; ! this.checkBoxOnlyWithAtLeastOneWinningDay.Size = new System.Drawing.Size(152, 24); ! this.checkBoxOnlyWithAtLeastOneWinningDay.TabIndex = 38; ! this.checkBoxOnlyWithAtLeastOneWinningDay.Text = "Exclude \"pure\" losers"; ! this.toolTip1.SetToolTip(this.checkBoxOnlyWithAtLeastOneWinningDay, "Check if you want to filter only tickers with at least one winning day"); // // TickerSelectorForm --- 431,451 ---- this.dataGrid1.TabIndex = 2; // ! // textBoxNumDaysBetweenEachClose // ! this.textBoxNumDaysBetweenEachClose.Location = new System.Drawing.Point(328, 208); ! this.textBoxNumDaysBetweenEachClose.Name = "textBoxNumDaysBetweenEachClose"; ! this.textBoxNumDaysBetweenEachClose.Size = new System.Drawing.Size(32, 20); ! this.textBoxNumDaysBetweenEachClose.TabIndex = 39; ! this.textBoxNumDaysBetweenEachClose.Text = ""; ! this.textBoxNumDaysBetweenEachClose.Visible = false; ! // ! // labelNumDaysBetweenEachClose ! // ! this.labelNumDaysBetweenEachClose.Location = new System.Drawing.Point(184, 208); ! this.labelNumDaysBetweenEachClose.Name = "labelNumDaysBetweenEachClose"; ! this.labelNumDaysBetweenEachClose.Size = new System.Drawing.Size(144, 23); ! this.labelNumDaysBetweenEachClose.TabIndex = 40; ! this.labelNumDaysBetweenEachClose.Text = "Num days betw. each close"; ! this.labelNumDaysBetweenEachClose.Visible = false; // // TickerSelectorForm *************** *** 516,520 **** this.dateTimePickerLastDate.Value, Int32.Parse(this.textBoxMaxNumOfReturnedTickers.Text)); } ! else if (this.comboBoxAvailableSelectionRules.Text == "CloseToOpenVolatility") { if(this.textBoxGroupID.Text != "") --- 543,547 ---- this.dateTimePickerLastDate.Value, Int32.Parse(this.textBoxMaxNumOfReturnedTickers.Text)); } ! else if (this.comboBoxAvailableSelectionRules.Text == "OpenToCloseVolatility") { if(this.textBoxGroupID.Text != "") *************** *** 526,530 **** this.checkBoxASCMode.Checked, this.dateTimePickerFirstDate.Value, this.dateTimePickerLastDate.Value, Int32.Parse(this.textBoxMaxNumOfReturnedTickers.Text)); ! } else if (this.comboBoxAvailableSelectionRules.Text == "AverageCloseToClosePerformance") { --- 553,568 ---- this.checkBoxASCMode.Checked, this.dateTimePickerFirstDate.Value, this.dateTimePickerLastDate.Value, Int32.Parse(this.textBoxMaxNumOfReturnedTickers.Text)); ! } ! else if (this.comboBoxAvailableSelectionRules.Text == "CloseToOpenVolatility") ! { ! if(this.textBoxGroupID.Text != "") ! returnValue = new SelectorByCloseToOpenVolatility (this.textBoxGroupID.Text, ! this.checkBoxASCMode.Checked, this.dateTimePickerFirstDate.Value, ! this.dateTimePickerLastDate.Value, Int32.Parse(this.textBoxMaxNumOfReturnedTickers.Text)); ! else ! returnValue = new SelectorByCloseToOpenVolatility (this.tableOfSelectedTickers, ! this.checkBoxASCMode.Checked, this.dateTimePickerFirstDate.Value, ! this.dateTimePickerLastDate.Value, Int32.Parse(this.textBoxMaxNumOfReturnedTickers.Text)); ! } else if (this.comboBoxAvailableSelectionRules.Text == "AverageCloseToClosePerformance") { *************** *** 549,553 **** this.dateTimePickerLastDate.Value, Int32.Parse(this.textBoxMaxNumOfReturnedTickers.Text)); } ! else if (this.comboBoxAvailableSelectionRules.Text == "CloseToOpenLinearCorrelation") { if(this.textBoxGroupID.Text != "") --- 587,591 ---- this.dateTimePickerLastDate.Value, Int32.Parse(this.textBoxMaxNumOfReturnedTickers.Text)); } ! else if (this.comboBoxAvailableSelectionRules.Text == "OpenToCloseLinearCorrelation") { if(this.textBoxGroupID.Text != "") *************** *** 560,564 **** this.dateTimePickerLastDate.Value, Int32.Parse(this.textBoxMaxNumOfReturnedTickers.Text)); } ! else if (this.comboBoxAvailableSelectionRules.Text == "AverageCloseToOpenPerformance") { if(this.textBoxGroupID.Text != "") --- 598,602 ---- this.dateTimePickerLastDate.Value, Int32.Parse(this.textBoxMaxNumOfReturnedTickers.Text)); } ! else if (this.comboBoxAvailableSelectionRules.Text == "AverageOpenToClosePerformance") { if(this.textBoxGroupID.Text != "") *************** *** 570,574 **** this.checkBoxASCMode.Checked, this.dateTimePickerFirstDate.Value, this.dateTimePickerLastDate.Value, Int32.Parse(this.textBoxMaxNumOfReturnedTickers.Text)); ! } else if (this.comboBoxAvailableSelectionRules.Text == "QuotedAtEachMarketDay") { --- 608,623 ---- this.checkBoxASCMode.Checked, this.dateTimePickerFirstDate.Value, this.dateTimePickerLastDate.Value, Int32.Parse(this.textBoxMaxNumOfReturnedTickers.Text)); ! } ! else if (this.comboBoxAvailableSelectionRules.Text == "AverageCloseToOpenPerformance") ! { ! if(this.textBoxGroupID.Text != "") ! returnValue = new SelectorByAverageCloseToOpenPerformance(this.textBoxGroupID.Text, ! this.checkBoxASCMode.Checked, this.dateTimePickerFirstDate.Value, ! this.dateTimePickerLastDate.Value, Int32.Parse(this.textBoxMaxNumOfReturnedTickers.Text)); ! else ! returnValue = new SelectorByAverageCloseToOpenPerformance(this.tableOfSelectedTickers, ! this.checkBoxASCMode.Checked, this.dateTimePickerFirstDate.Value, ! this.dateTimePickerLastDate.Value, Int32.Parse(this.textBoxMaxNumOfReturnedTickers.Text)); ! } else if (this.comboBoxAvailableSelectionRules.Text == "QuotedAtEachMarketDay") { *************** *** 611,615 **** this.checkBoxOnlyWithAtLeastOneWinningDay.Checked); } ! else if (this.comboBoxAvailableSelectionRules.Text == "OpenCloseCorrelationToBenchmark") { if(this.textBoxGroupID.Text != "") --- 660,664 ---- this.checkBoxOnlyWithAtLeastOneWinningDay.Checked); } ! else if (this.comboBoxAvailableSelectionRules.Text == "OpenToCloseCorrelationToBenchmark") { if(this.textBoxGroupID.Text != "") *************** *** 622,625 **** --- 671,687 ---- this.dateTimePickerLastDate.Value, Int32.Parse(this.textBoxMaxNumOfReturnedTickers.Text)); } + else if (this.comboBoxAvailableSelectionRules.Text == "CloseToCloseCorrelationToBenchmark") + { + if(this.textBoxGroupID.Text != "") + returnValue = new SelectorByCloseToCloseCorrelationToBenchmark(this.textBoxGroupID.Text, this.textBoxMarketIndex.Text, + this.checkBoxASCMode.Checked, this.dateTimePickerFirstDate.Value, + this.dateTimePickerLastDate.Value, Int32.Parse(this.textBoxMaxNumOfReturnedTickers.Text), + Int32.Parse(this.textBoxNumDaysBetweenEachClose.Text)); + else + returnValue = new SelectorByCloseToCloseCorrelationToBenchmark(this.tableOfSelectedTickers, this.textBoxMarketIndex.Text, + this.checkBoxASCMode.Checked, this.dateTimePickerFirstDate.Value, + this.dateTimePickerLastDate.Value, Int32.Parse(this.textBoxMaxNumOfReturnedTickers.Text), + Int32.Parse(this.textBoxNumDaysBetweenEachClose.Text)); + } return returnValue; } *************** *** 648,657 **** this.textBoxMaxStdDev.Visible = showControls; ! } private void comboBoxAvailableSelectionRules_SelectedValueChanged(object sender, System.EventArgs e) { if(this.comboBoxAvailableSelectionRules.Text == "QuotedAtEachMarketDay" || ! this.comboBoxAvailableSelectionRules.Text == "OpenCloseCorrelationToBenchmark") { this.setVisibilityForControls_AverageRawOpenPrice(false); this.setVisibilityForControls_WinningOpenToClose(false); --- 710,729 ---- this.textBoxMaxStdDev.Visible = showControls; ! } ! ! private void setVisibilityForControls_NumDaysBetweenEachClose(bool showControls) ! { ! this.labelNumDaysBetweenEachClose.Visible = showControls; ! this.textBoxNumDaysBetweenEachClose.Visible = showControls; ! this.labelMarketIndexKey.Visible = showControls; ! this.textBoxMarketIndex.Visible = showControls; ! } ! private void comboBoxAvailableSelectionRules_SelectedValueChanged(object sender, System.EventArgs e) { if(this.comboBoxAvailableSelectionRules.Text == "QuotedAtEachMarketDay" || ! this.comboBoxAvailableSelectionRules.Text == "OpenToCloseCorrelationToBenchmark") { + this.setVisibilityForControls_NumDaysBetweenEachClose(false); this.setVisibilityForControls_AverageRawOpenPrice(false); this.setVisibilityForControls_WinningOpenToClose(false); *************** *** 661,664 **** --- 733,737 ---- { this.textBoxMarketIndex.Text = ""; + this.setVisibilityForControls_NumDaysBetweenEachClose(false); this.setVisibilityForControls_QuotedAtEachMarketDay(false); this.setVisibilityForControls_WinningOpenToClose(false); *************** *** 668,675 **** --- 741,756 ---- { this.textBoxMarketIndex.Text = ""; + this.setVisibilityForControls_NumDaysBetweenEachClose(false); this.setVisibilityForControls_QuotedAtEachMarketDay(false); this.setVisibilityForControls_AverageRawOpenPrice(false); this.setVisibilityForControls_WinningOpenToClose(true); } + else if(this.comboBoxAvailableSelectionRules.Text == "CloseToCloseCorrelationToBenchmark") + { + this.setVisibilityForControls_QuotedAtEachMarketDay(false); + this.setVisibilityForControls_AverageRawOpenPrice(false); + this.setVisibilityForControls_WinningOpenToClose(false); + this.setVisibilityForControls_NumDaysBetweenEachClose(true); + } else { *************** *** 678,681 **** --- 759,763 ---- this.setVisibilityForControls_AverageRawOpenPrice(false); this.setVisibilityForControls_WinningOpenToClose(false); + this.setVisibilityForControls_NumDaysBetweenEachClose(false); this.checkBoxASCMode.Enabled = true; } |