[Quantproject-developers] QuantDownloader/Downloader/OpenTickDownloader OTTickerDownloader.cs, 1.5
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2009-01-07 23:27:32
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/OpenTickDownloader In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23732/Downloader/OpenTickDownloader Modified Files: OTTickerDownloader.cs Log Message: the class now downloads (not necessarely adiacent) daily bars according to a given list of Time(s) Index: OTTickerDownloader.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/OpenTickDownloader/OTTickerDownloader.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** OTTickerDownloader.cs 3 Jan 2009 18:38:31 -0000 1.5 --- OTTickerDownloader.cs 7 Jan 2009 23:27:15 -0000 1.6 *************** *** 21,24 **** --- 21,25 ---- */ using System; + using System.Collections.Generic; using System.Data; using System.Threading; *************** *** 26,29 **** --- 27,31 ---- using QuantProject.ADT; + using QuantProject.ADT.Timing; using QuantProject.Presentation; *************** *** 42,59 **** { private string[] tickersToDownload; private DateTime firstDate; ! /// <summary> ! /// time (date doesn't matter for this member) for the first ! /// bar to be downloaded, each day ! /// </summary> ! private DateTime firstBarOpenTimeInNewYorkTimeZone; /// <summary> /// number of seconds in each bar /// </summary> private int barInterval; ! /// <summary> ! /// number of bars to be downloaded for each day ! /// </summary> ! private int numberOfDailyBars; private DateTime dateTimeForOverWritingQuotes;//before this //date quotes should be overwritten automatically --- 44,62 ---- { private string[] tickersToDownload; + private List<Time> dailyTimes; private DateTime firstDate; ! // /// <summary> ! // /// time (date doesn't matter for this member) for the first ! // /// bar to be downloaded, each day ! // /// </summary> ! // private DateTime firstBarOpenTimeInNewYorkTimeZone; /// <summary> /// number of seconds in each bar /// </summary> private int barInterval; ! // /// <summary> ! // /// number of bars to be downloaded for each day ! // /// </summary> ! // private int numberOfDailyBars; private DateTime dateTimeForOverWritingQuotes;//before this //date quotes should be overwritten automatically *************** *** 105,114 **** public OTTickerDownloader( string[] tickersToDownload, DateTime firstDate, ! int fromHour , ! int fromMinute , ! int fromSecond , int barInterval , ! int numberOfDailyBars , DateTime dateTimeForOverWritingQuotes, bool checkForMissingQuotes, --- 108,118 ---- public OTTickerDownloader( string[] tickersToDownload, + List<Time> dailyTimes , DateTime firstDate, ! // int fromHour , ! // int fromMinute , ! // int fromSecond , int barInterval , ! // int numberOfDailyBars , DateTime dateTimeForOverWritingQuotes, bool checkForMissingQuotes, *************** *** 127,136 **** openTickPassword); this.tickersToDownload = tickersToDownload; this.firstDate = firstDate; ! this.firstBarOpenTimeInNewYorkTimeZone = ! new DateTime( ! 1 , 1 , 1 , fromHour , fromMinute , fromSecond ); this.barInterval = barInterval; ! this.numberOfDailyBars = numberOfDailyBars; this.dateTimeForOverWritingQuotes = dateTimeForOverWritingQuotes; this.checkForMissingQuotes = checkForMissingQuotes; --- 131,141 ---- openTickPassword); this.tickersToDownload = tickersToDownload; + this.dailyTimes = dailyTimes; this.firstDate = firstDate; ! // this.firstBarOpenTimeInNewYorkTimeZone = ! // new DateTime( ! // 1 , 1 , 1 , fromHour , fromMinute , fromSecond ); this.barInterval = barInterval; ! // this.numberOfDailyBars = numberOfDailyBars; this.dateTimeForOverWritingQuotes = dateTimeForOverWritingQuotes; this.checkForMissingQuotes = checkForMissingQuotes; *************** *** 197,202 **** this.setBarsSelector_getDate( DateTime.Now ) , this.barInterval , ! this.firstBarOpenTimeInNewYorkTimeZone , ! this.numberOfDailyBars ); else // all quotes are to be downloaded, even if they --- 202,208 ---- this.setBarsSelector_getDate( DateTime.Now ) , this.barInterval , ! this.dailyTimes ); ! // this.firstBarOpenTimeInNewYorkTimeZone , ! // this.numberOfDailyBars ); else // all quotes are to be downloaded, even if they *************** *** 208,218 **** this.setBarsSelector_getDate( DateTime.Now ) , this.barInterval , ! this.firstBarOpenTimeInNewYorkTimeZone , ! this.numberOfDailyBars ); } private void setExchangeSelector() { ! this.exchangeSelector = ! new MostLiquidExchangeSelector(); } #region setBarsDownloaderAndRunIt --- 214,225 ---- this.setBarsSelector_getDate( DateTime.Now ) , this.barInterval , ! this.dailyTimes ); ! // this.firstBarOpenTimeInNewYorkTimeZone , ! // this.numberOfDailyBars ); } private void setExchangeSelector() { ! this.exchangeSelector = ! new MostLiquidExchangeSelector(); } #region setBarsDownloaderAndRunIt *************** *** 264,268 **** // @"C:\Quant\OpenTickDownloader\textFilesForLoggingNotification\textFileForLoggingNotification"; string logFileName = ! Application.StartupPath + "\\textFileForLoggingNotification"; logFileName = logFileName + "_" + ExtendedDateTime.GetCompleteShortDescriptionForFileName( --- 271,275 ---- // @"C:\Quant\OpenTickDownloader\textFilesForLoggingNotification\textFileForLoggingNotification"; string logFileName = ! Application.StartupPath + "\\textFileForLoggingNotification"; logFileName = logFileName + "_" + ExtendedDateTime.GetCompleteShortDescriptionForFileName( |