[Quantproject-developers] QuantProject/b4_Business/a05_Timing IndexBasedEndOfDayTimer.cs,1.3,1.4
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2005-03-06 21:35:09
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a05_Timing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26667/b4_Business/a05_Timing Modified Files: IndexBasedEndOfDayTimer.cs Log Message: Now an exception is thrown when an Index has no quotes within the given interval. Index: IndexBasedEndOfDayTimer.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a05_Timing/IndexBasedEndOfDayTimer.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IndexBasedEndOfDayTimer.cs 30 Jan 2005 19:57:38 -0000 1.3 --- IndexBasedEndOfDayTimer.cs 6 Mar 2005 21:34:58 -0000 1.4 *************** *** 47,50 **** --- 47,56 ---- this.marketIndex = marketIndex; this.indexQuotes = new Quotes(marketIndex,startDateTime.DateTime,DateTime.Now); + if ( this.indexQuotes.Rows.Count == 0 ) + { + string errorMessage = "IndexBasedEndOfDayTimer error: the given " + + "index has no quotes in the interval."; + throw new Exception( errorMessage ); + } this.StartDateTime = new EndOfDayDateTime(this.indexQuotes.GetQuoteDateOrFollowing(this.StartDateTime.DateTime), |