[Quantproject-developers] QuantDownloader/Downloader/OpenTickDownloader/BarsSelectors DailyBarsSel
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2009-01-03 18:45:22
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/OpenTickDownloader/BarsSelectors In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30455/Downloader/OpenTickDownloader/BarsSelectors Modified Files: DailyBarsSelector.cs Log Message: bug fixed: the previous version threw out an unhandled exception after having requested the last bar (it happened just in some cases, for instance it happened if the last date was not on a market day) Index: DailyBarsSelector.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/OpenTickDownloader/BarsSelectors/DailyBarsSelector.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DailyBarsSelector.cs 20 Jul 2008 20:31:54 -0000 1.2 --- DailyBarsSelector.cs 3 Jan 2009 18:45:12 -0000 1.3 *************** *** 178,187 **** #endregion doNextStep ! private bool isTheCurrentBarBeyondTheLastDate() ! { ! bool isBeyondTheLastDate = ! ( this.currentDate.CompareTo( this.lastDate ) > 0 ); ! return isBeyondTheLastDate; ! } #region isTheCurrentBarSelectable --- 178,187 ---- #endregion doNextStep ! // private bool isTheCurrentBarBeyondTheLastDate() ! // { ! // bool isBeyondTheLastDate = ! // ( this.currentDate.CompareTo( this.lastDate ) > 0 ); ! // return isBeyondTheLastDate; ! // } #region isTheCurrentBarSelectable *************** *** 207,211 **** { this.doNextStep(); ! while ( !this.isTheCurrentBarBeyondTheLastDate() && !this.isTheCurrentBarSelectable() ) this.doNextStep(); --- 207,213 ---- { this.doNextStep(); ! // while ( !this.isTheCurrentBarBeyondTheLastDate() && ! // !this.isTheCurrentBarSelectable() ) ! while ( !this.AreAllBarsAlredyGiven && !this.isTheCurrentBarSelectable() ) this.doNextStep(); |