[Quantproject-developers] QuantDownloader/Downloader/OpenTickDownloader BarQueueFiller.cs, 1.3, 1.
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2009-01-11 20:38:22
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/OpenTickDownloader In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv17077/Downloader/OpenTickDownloader Modified Files: BarQueueFiller.cs BarsDownloader.cs Log Message: Old commented code has been removed Index: BarsDownloader.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/OpenTickDownloader/BarsDownloader.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BarsDownloader.cs 20 Jul 2008 20:30:06 -0000 1.2 --- BarsDownloader.cs 11 Jan 2009 20:38:14 -0000 1.3 *************** *** 3,7 **** BarsDownloader.cs ! Copyright (C) 2008 Glauco Siliprandi --- 3,7 ---- BarsDownloader.cs ! Copyright (C) 2008 Glauco Siliprandi *************** *** 19,23 **** along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! */ using System; --- 19,23 ---- along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! */ using System; *************** *** 48,66 **** private OTManager oTManager; - // private string ticker; - // private DateTime firstDate; - // private DateTime lastDate; - // private int barInterval; - // private DateTime firstBarOpenTime; - // private int numberOfBarsToBeDownloadedForEachDay; - private BarQueue barQueue; private BarQueueFiller barQueueFiller; private DataBaseWriter dataBaseWriter; - // private MainExchangeFinder mainExchangeFinder; - - // public event ExchangeNotFoundEventHandler ExchangeNotFound; - /// <summary> /// Downloads and writes to database the requested bars --- 48,55 ---- *************** *** 82,92 **** string openTickUser , string openTickPassword - // , - // string ticker , - // DateTime firstDate , - // DateTime lastDate , - // int barInterval , - // DateTime firstBarOpenTime , - // int numberOfBarsToBeDownloadedForEachDay ) { --- 71,74 ---- *************** *** 96,123 **** this.openTickPassword = openTickPassword; this.oTManager = new OTManager(); - // this.ticker = ticker; - // this.firstDate = firstDate; - // this.lastDate = lastDate; - // this.barInterval = barInterval; - // this.firstBarOpenTime = firstBarOpenTime; - // this.numberOfBarsToBeDownloadedForEachDay = - // numberOfBarsToBeDownloadedForEachDay; } #region DownloadBars - - // private void runMainExchangeFinder() - // { - // // consider using this.oTClient.requestListSymbols( string exchange ); - //// this.mainExchangeFinder = - //// new MainExchangeFinder( this.oTClient , this.ticker ); - // this.mainExchangeFinder.NewOHLCRequest += - // new NewOHLCRequestEventHandler( this.newOHLCRequestEventHandler ); - // mainExchangeFinder.FindMainExchange(); - // while ( !mainExchangeFinder.IsSearchComplete ) - // // the main exchange has not been found, yet - // Thread.Sleep( 200 ); - // } - private void initializeBarQueue() { --- 78,84 ---- *************** *** 147,158 **** this.exchangeSelector , this.oTManager , ! // this.ticker , ! // this.mainExchangeFinder.MainExchange , ! // this.firstDate , ! // this.lastDate , ! // this.barInterval , ! // this.firstBarOpenTime , ! // this.numberOfBarsToBeDownloadedForEachDay , ! this.barQueue ); this.barQueueFiller.NewOHLCRequest += --- 108,112 ---- this.exchangeSelector , this.oTManager , ! this.barQueue ); this.barQueueFiller.NewOHLCRequest += *************** *** 198,217 **** private void onLoginEventHandler() { ! // this.runMainExchangeFinder(); ! // if ( this.mainExchangeFinder.IsMainExchangeFound ) ! // // the main exchange has been found and ! // { ! this.initializeDownloadingObjects(); ! this.startThreadToFillBarQueue(); ! this.startThreadToWriteBarsFromBuffersToTheDatabase(); ! // } ! // else ! // this.ExchangeNotFound( this , this.ticker ); ! ! // this.downloadBarsThread = new Thread( ! // new ThreadStart( this.downloadBars ) ); ! // this.downloadBarsThread.Start(); ! ! // this.testForDaylightSavingTime(); } --- 152,158 ---- private void onLoginEventHandler() { ! this.initializeDownloadingObjects(); ! this.startThreadToFillBarQueue(); ! this.startThreadToWriteBarsFromBuffersToTheDatabase(); } Index: BarQueueFiller.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/OpenTickDownloader/BarQueueFiller.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** BarQueueFiller.cs 18 Aug 2008 21:03:52 -0000 1.3 --- BarQueueFiller.cs 11 Jan 2009 20:38:14 -0000 1.4 *************** *** 47,57 **** private OTManager oTManager; - // private string ticker; - // private string exchange; - // private DateTime firstDate; - // private DateTime lastDate; - // private long barInterval; - // private DateTime firstBarOpenTime; - // private int numberOfBarsToBeDownloadedForEachDay; private BarQueue barQueue; --- 47,50 ---- *************** *** 59,64 **** private Thread fillQueueThread; - // private bool working; - // private DateTime currentDate; /// <summary> --- 52,55 ---- *************** *** 84,94 **** IExchangeSelector exchangeSelector , OTManager oTManager , - // string ticker , - // string exchange , - // DateTime firstDate , - // DateTime lastDate , - // long barInterval , - // DateTime firstBarOpenTime , - // int numberOfBarsToBeDownloadedForEachDay , BarQueue barQueue ) --- 75,78 ---- *************** *** 103,114 **** new NewMessageEventHandler( this.newMessageEventHandler ); - // this.ticker = ticker; - // this.exchange = exchange; - // this.firstDate = firstDate; - // this.lastDate = lastDate; - // this.barInterval = barInterval; - // this.firstBarOpenTime = firstBarOpenTime; - // this.numberOfBarsToBeDownloadedForEachDay = - // numberOfBarsToBeDownloadedForEachDay; this.barQueue = barQueue; } --- 87,90 ---- *************** *** 167,181 **** #region fillQueue_requestBarsForEachMarketDay ! // private bool isAPossibleMarketDay( DateTime currentDate ) ! // { ! // bool isAPossibleMarkDay = ! // ( currentDate.DayOfWeek != DayOfWeek.Saturday ) && ! // ( currentDate.DayOfWeek != DayOfWeek.Sunday ) && ! // !( ( currentDate.Month == 1 ) && ( currentDate.Day == 1 ) ) && ! // !( ( currentDate.Month == 12 ) && ( currentDate.Day == 25 ) ); ! // ! // return isAPossibleMarkDay; ! // } ! #region fillQueue_requestBar private void fillQueue_requestBar_actually( --- 143,147 ---- #region fillQueue_requestBarsForEachMarketDay ! #region fillQueue_requestBar private void fillQueue_requestBar_actually( *************** *** 207,218 **** this.fillQueue_requestBar_actually( barIdentifier , exchange ); } - // private void fillQueue_requestBars( DateTime currentDate ) - // { - // for ( int currentDailyBarIndex = 0 ; - // currentDailyBarIndex < this.numberOfBarsToBeDownloadedForEachDay ; - // currentDailyBarIndex++ ) - // this.fillQueue_requestBar( - // currentDate , currentDailyBarIndex ); - // } #endregion fillQueue_requestBar --- 173,176 ---- *************** *** 222,232 **** this.fillQueue_requestBar( this.barsSelector.GetNextBarIdentifier() ); - // DateTime currentDate = this.firstDate; - // while ( currentDate <= this.lastDate ) - // { - // if ( this.isAPossibleMarketDay( currentDate ) ) - // this.fillQueue_requestBars( currentDate ); - // currentDate = currentDate.AddDays( 1 ); - // } } #endregion fillQueue_requestBarsForEachMarketDay --- 180,183 ---- |