[Quantproject-developers] QuantDownloader/Downloader TickerDownloader.cs,1.15,1.16 WebDownloader.cs,
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2005-06-02 17:52:23
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11184/Downloader Modified Files: TickerDownloader.cs WebDownloader.cs Log Message: Fixed bug in the TickerDownloader object. Now, new adjusted quotes are committed to database only if the new close to close ratio is the same as previous one. This check has to be set by the user through the WebDownloader form. Index: WebDownloader.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/WebDownloader.cs,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** WebDownloader.cs 22 Jan 2005 19:35:04 -0000 1.18 --- WebDownloader.cs 2 Jun 2005 17:52:10 -0000 1.19 *************** *** 52,55 **** --- 52,56 ---- internal System.Windows.Forms.CheckBox checkBoxComputeCloseToCloseValues; private System.Windows.Forms.ToolTip toolTip1; + internal System.Windows.Forms.CheckBox checkBoxDownloadOnlyAfterCloseToCloseCheck; private System.ComponentModel.IContainer components; *************** *** 153,156 **** --- 154,158 ---- this.checkBoxComputeCloseToCloseValues = new System.Windows.Forms.CheckBox(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.checkBoxDownloadOnlyAfterCloseToCloseCheck = new System.Windows.Forms.CheckBox(); ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit(); this.groupBoxWebDownloaderOptions.SuspendLayout(); *************** *** 160,164 **** // button1 // ! this.button1.Location = new System.Drawing.Point(16, 392); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(112, 32); --- 162,166 ---- // button1 // ! this.button1.Location = new System.Drawing.Point(16, 424); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(112, 32); *************** *** 255,259 **** // buttonDownloadQuotesOfSelectedTickers // ! this.buttonDownloadQuotesOfSelectedTickers.Location = new System.Drawing.Point(136, 392); this.buttonDownloadQuotesOfSelectedTickers.Name = "buttonDownloadQuotesOfSelectedTickers"; this.buttonDownloadQuotesOfSelectedTickers.Size = new System.Drawing.Size(112, 32); --- 257,261 ---- // buttonDownloadQuotesOfSelectedTickers // ! this.buttonDownloadQuotesOfSelectedTickers.Location = new System.Drawing.Point(136, 424); this.buttonDownloadQuotesOfSelectedTickers.Name = "buttonDownloadQuotesOfSelectedTickers"; this.buttonDownloadQuotesOfSelectedTickers.Size = new System.Drawing.Size(112, 32); *************** *** 264,268 **** // labelNumberOfTickersToDownload // ! this.labelNumberOfTickersToDownload.Location = new System.Drawing.Point(160, 448); this.labelNumberOfTickersToDownload.Name = "labelNumberOfTickersToDownload"; this.labelNumberOfTickersToDownload.Size = new System.Drawing.Size(48, 24); --- 266,270 ---- // labelNumberOfTickersToDownload // ! this.labelNumberOfTickersToDownload.Location = new System.Drawing.Point(160, 472); this.labelNumberOfTickersToDownload.Name = "labelNumberOfTickersToDownload"; this.labelNumberOfTickersToDownload.Size = new System.Drawing.Size(48, 24); *************** *** 272,276 **** // labelTickersLeft // ! this.labelTickersLeft.Location = new System.Drawing.Point(16, 448); this.labelTickersLeft.Name = "labelTickersLeft"; this.labelTickersLeft.Size = new System.Drawing.Size(136, 24); --- 274,278 ---- // labelTickersLeft // ! this.labelTickersLeft.Location = new System.Drawing.Point(16, 472); this.labelTickersLeft.Name = "labelTickersLeft"; this.labelTickersLeft.Size = new System.Drawing.Size(136, 24); *************** *** 385,389 **** // this.buttonAbort.Enabled = false; ! this.buttonAbort.Location = new System.Drawing.Point(256, 408); this.buttonAbort.Name = "buttonAbort"; this.buttonAbort.Size = new System.Drawing.Size(32, 23); --- 387,391 ---- // this.buttonAbort.Enabled = false; ! this.buttonAbort.Location = new System.Drawing.Point(256, 440); this.buttonAbort.Name = "buttonAbort"; this.buttonAbort.Size = new System.Drawing.Size(32, 23); *************** *** 401,409 **** this.checkBoxComputeCloseToCloseValues.Text = "Compute close to close ratios (slower)"; // // WebDownloader // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); ! this.ClientSize = new System.Drawing.Size(840, 486); this.Controls.AddRange(new System.Windows.Forms.Control[] { this.checkBoxComputeCloseToCloseValues, this.buttonAbort, --- 403,422 ---- this.checkBoxComputeCloseToCloseValues.Text = "Compute close to close ratios (slower)"; // + // checkBoxDownloadOnlyAfterCloseToCloseCheck + // + this.checkBoxDownloadOnlyAfterCloseToCloseCheck.Location = new System.Drawing.Point(16, 384); + this.checkBoxDownloadOnlyAfterCloseToCloseCheck.Name = "checkBoxDownloadOnlyAfterCloseToCloseCheck"; + this.checkBoxDownloadOnlyAfterCloseToCloseCheck.Size = new System.Drawing.Size(272, 24); + this.checkBoxDownloadOnlyAfterCloseToCloseCheck.TabIndex = 17; + this.checkBoxDownloadOnlyAfterCloseToCloseCheck.Text = "Download only after CTC check (slower)"; + this.toolTip1.SetToolTip(this.checkBoxDownloadOnlyAfterCloseToCloseCheck, "If checked, commit to database is performed only for tickers for which new adjust" + + "ed values respect current close to close ratio "); + // // WebDownloader // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); ! this.ClientSize = new System.Drawing.Size(840, 494); this.Controls.AddRange(new System.Windows.Forms.Control[] { + this.checkBoxDownloadOnlyAfterCloseToCloseCheck, this.checkBoxComputeCloseToCloseValues, this.buttonAbort, *************** *** 790,793 **** --- 803,813 ---- } } + public bool IsCheckCloseToCloseSelected + { + get + { + return this.checkBoxDownloadOnlyAfterCloseToCloseCheck.Checked; + } + } } } Index: TickerDownloader.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/TickerDownloader.cs,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** TickerDownloader.cs 22 Jan 2005 19:35:04 -0000 1.15 --- TickerDownloader.cs 2 Jun 2005 17:52:09 -0000 1.16 *************** *** 325,329 **** { this.updateCurrentStatusAdjustedClose("Changed!"); ! if (Quotes.IsAdjustedCloseToCloseRatioChanged(this.p_quTicker, this.getTableOfDownloadedValues(Quotes.GetStartDate(this.p_quTicker), Quotes.GetEndDate(this.p_quTicker)))) --- 325,330 ---- { this.updateCurrentStatusAdjustedClose("Changed!"); ! if (this.p_myForm.IsCheckCloseToCloseSelected && ! Quotes.IsAdjustedCloseToCloseRatioChanged(this.p_quTicker, this.getTableOfDownloadedValues(Quotes.GetStartDate(this.p_quTicker), Quotes.GetEndDate(this.p_quTicker)))) *************** *** 335,339 **** else { ! this.updateCurrentStatusAdjustedCloseToCloseRatio("OK"); this.updateAdjustedClose(); this.updateCurrentStatusAdjustedClose("Updated!"); --- 336,343 ---- else { ! if(this.p_myForm.IsCheckCloseToCloseSelected) ! this.updateCurrentStatusAdjustedCloseToCloseRatio("OK"); ! else ! this.updateCurrentStatusAdjustedCloseToCloseRatio("Not Checked"); this.updateAdjustedClose(); this.updateCurrentStatusAdjustedClose("Updated!"); |