[Quantproject-developers] QuantProject/b4_Business/a2_Strategies/returnsManagement/time ReturnInte
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2010-03-28 14:34:07
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a2_Strategies/returnsManagement/time In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv25251/a2_Strategies/returnsManagement/time Modified Files: ReturnIntervals.cs Log Message: The public read only property ReturnInterval SeconLastInterval has been added Index: ReturnIntervals.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a2_Strategies/returnsManagement/time/ReturnIntervals.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ReturnIntervals.cs 13 Mar 2009 15:05:42 -0000 1.11 --- ReturnIntervals.cs 28 Mar 2010 14:33:58 -0000 1.12 *************** *** 31,35 **** { /// <summary> ! /// End of day intervals in a timed sequence, i.e. the (n+1)th interval /// never begins before the (n)th interval ends /// </summary> --- 31,35 ---- { /// <summary> ! /// Time intervals in a timed sequence, i.e. the (n+1)th interval /// never begins before the (n)th interval ends /// </summary> *************** *** 84,87 **** --- 84,100 ---- } } + + public ReturnInterval SeconLastInterval + { + get + { + if ( this.Count < 2 ) + throw new Exception( + "SeconLastInterval cannot be used when ReturnIntervals has " + + "less then two intervals!" ); + ReturnInterval lastInterval = this[ this.Count - 2 ]; + return lastInterval; + } + } /// <summary> /// The History made up by queuing all |