[Quantproject-developers] QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/SummaryR
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2006-06-08 18:45:43
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/SummaryRows In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24026/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/SummaryRows Modified Files: NumberWinningPeriods.cs Log Message: a format string for 6 decimals has been added (a general method should be implemented; in the to do list) Index: NumberWinningPeriods.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/SummaryRows/NumberWinningPeriods.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** NumberWinningPeriods.cs 15 Oct 2005 18:11:54 -0000 1.4 --- NumberWinningPeriods.cs 8 Jun 2006 18:45:28 -0000 1.5 *************** *** 40,43 **** --- 40,46 ---- private double numberLosingPeriods; private double numberEvenPeriods; + private double numberPositivePeriods; + private double numberNegativePeriods; + private double numberZeroPeriods; private void setWinningLosingAndEvenPeriods_forPeriod( int i ) *************** *** 60,70 **** this.numberEvenPeriods++; } } ! public void SetWinningLosingAndEvenPeriods() { this.numberWinningPeriods = 0; this.numberLosingPeriods = 0; this.numberEvenPeriods = 0; for ( int i=0; i<this.summary.AccountReport.EquityLine.Count - 1 ; i++ ) this.setWinningLosingAndEvenPeriods_forPeriod( i ); --- 63,87 ---- this.numberEvenPeriods++; } + if ( equityHistoryGain < 0 ) + this.numberNegativePeriods ++; + else + { + if ( equityHistoryGain > 0 ) + this.numberPositivePeriods ++; + else + // equityHistoryGain == 0 + this.numberZeroPeriods ++; + } + } ! public void SetWinningLosingPositiveAndNegativePeriods() { this.numberWinningPeriods = 0; this.numberLosingPeriods = 0; this.numberEvenPeriods = 0; + this.numberPositivePeriods = 0; + this.numberNegativePeriods = 0; + this.numberZeroPeriods = 0; for ( int i=0; i<this.summary.AccountReport.EquityLine.Count - 1 ; i++ ) this.setWinningLosingAndEvenPeriods_forPeriod( i ); *************** *** 73,77 **** { this.summary = summary; ! this.SetWinningLosingAndEvenPeriods(); this.rowDescription = "# winning periods"; this.format = ConstantsProvider.FormatWithZeroDecimals; --- 90,94 ---- { this.summary = summary; ! this.SetWinningLosingPositiveAndNegativePeriods(); this.rowDescription = "# winning periods"; this.format = ConstantsProvider.FormatWithZeroDecimals; *************** *** 82,85 **** --- 99,110 ---- get { return this.numberLosingPeriods; } } + public double NumberPositivePeriods + { + get { return this.numberPositivePeriods; } + } + public double NumberNegativePeriods + { + get { return this.numberNegativePeriods; } + } } } |