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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Sep 13 15:11:12 CEST 2012


Author: opentrades
Date: 2012-09-13 15:11:11 +0200 (Thu, 13 Sep 2012)
New Revision: 1177

Modified:
   pkg/blotter/R/chart.ME.R
Log:
fixed warning msg: division by trades$Max.Notional.Cost[i] instead of trades$Max.Notional.Cost



Modified: pkg/blotter/R/chart.ME.R
===================================================================
--- pkg/blotter/R/chart.ME.R	2012-09-12 18:36:25 UTC (rev 1176)
+++ pkg/blotter/R/chart.ME.R	2012-09-13 13:11:11 UTC (rev 1177)
@@ -150,7 +150,7 @@
         # percentage P&L
         trade$Pct.PL <- trade$PosPL/trade$Pos.Value #broken for last timestamp
         #insert the correct value for the last mark
-        trade$Pct.PL[length(trade$Pct.PL)]<-last(trade$PosPL)/trades$Max.Notional.Cost
+        trade$Pct.PL[length(trade$Pct.PL)]<-last(trade$PosPL)/trades$Max.Notional.Cost[i]
         
         trades$Pct.Net.Trading.PL[i] <- last(trade$Pct.PL)
         trades$Pct.MAE[i] <- min(0,trade$Pct.PL)



More information about the Blotter-commits mailing list