[Quantproject-developers] QuantDownloader/Downloader TickerDownloader.cs,1.8,1.9
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2004-06-17 19:53:47
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17166/Downloader Modified Files: TickerDownloader.cs Log Message: The ticker downloader now is able to update adjusted close automatically (all quotes are downloaded unless the close to close ratio has changed). The downloader is complete for the two options available in the web downloader Index: TickerDownloader.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/TickerDownloader.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** TickerDownloader.cs 12 Jun 2004 23:03:50 -0000 1.8 --- TickerDownloader.cs 17 Jun 2004 19:53:31 -0000 1.9 *************** *** 346,353 **** --- 346,359 ---- this.updateCurrentStatusAdjustedCloseToCloseRatio("Changed at " + Quotes.DateWithDifferentCloseToClose); + //stop } else { this.updateCurrentStatusAdjustedCloseToCloseRatio("OK"); + this.updateAdjustedClose(); + this.updateCurrentStatusAdjustedClose("Updated!"); + this.downloadedValuesFromSource = this.getTableOfDownloadedValues(Quotes.GetEndDate(this.p_quTicker), + DateTime.Now); + this.commitDownloadedValuesToDatabase(); } } *************** *** 366,369 **** --- 372,382 ---- } + private void updateAdjustedClose() + { + foreach(DataRow row in this.downloadedValuesFromSource.Rows) + { + Quotes.UpdateAdjustedClose(this.p_quTicker, (DateTime)row[Quotes.Date], (float)row[Quotes.AdjustedClose]); + } + } |