[Blotter-commits] r1056 - pkg/blotter/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jun 18 19:44:23 CEST 2012
Author: opentrades
Date: 2012-06-18 19:44:23 +0200 (Mon, 18 Jun 2012)
New Revision: 1056
Modified:
pkg/blotter/R/tradeStats.R
Log:
added column Number.Trades to reflect nrow(PL.ne0) - 1
Modified: pkg/blotter/R/tradeStats.R
===================================================================
--- pkg/blotter/R/tradeStats.R 2012-06-18 17:38:11 UTC (rev 1055)
+++ pkg/blotter/R/tradeStats.R 2012-06-18 17:44:23 UTC (rev 1056)
@@ -92,6 +92,7 @@
StdTradePL <- sd(as.numeric(as.vector(PL.ne0)))
NumberOfTxns <- nrow(txn)-1
+ NumberOfTrades <- nrow(PL.ne0)-1
PercentPositive <- (nrow(PL.gt0)/nrow(PL.ne0))*100
PercentNegative <- (nrow(PL.lt0)/nrow(PL.ne0))*100
@@ -141,6 +142,7 @@
tmpret <- data.frame(Portfolio=pname,
Symbol=symbol,
Num.Txns=NumberOfTxns,
+ Num.Trades=NumberOfTrades,
Total.Net.Profit=TotalNetProfit,
Avg.Trade.PL=AvgTradePL,
Med.Trade.PL=MedTradePL,
More information about the Blotter-commits
mailing list