[Blotter-commits] r1057 - pkg/blotter/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jun 18 19:48:44 CEST 2012


Author: opentrades
Date: 2012-06-18 19:48:44 +0200 (Mon, 18 Jun 2012)
New Revision: 1057

Modified:
   pkg/blotter/R/tradeStats.R
Log:
fixed bug: Num.Trades count was one too low



Modified: pkg/blotter/R/tradeStats.R
===================================================================
--- pkg/blotter/R/tradeStats.R	2012-06-18 17:44:23 UTC (rev 1056)
+++ pkg/blotter/R/tradeStats.R	2012-06-18 17:48:44 UTC (rev 1057)
@@ -92,7 +92,7 @@
             StdTradePL <- sd(as.numeric(as.vector(PL.ne0)))   
             
             NumberOfTxns <- nrow(txn)-1
-            NumberOfTrades <- nrow(PL.ne0)-1
+            NumberOfTrades <- nrow(PL.ne0)
             
             PercentPositive <- (nrow(PL.gt0)/nrow(PL.ne0))*100
             PercentNegative <- (nrow(PL.lt0)/nrow(PL.ne0))*100



More information about the Blotter-commits mailing list