[Blotter-commits] r531 - pkg/blotter/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Jan 14 17:42:24 CET 2011
Author: llevenson
Date: 2011-01-14 17:42:23 +0100 (Fri, 14 Jan 2011)
New Revision: 531
Modified:
pkg/blotter/R/chart.Posn.R
Log:
- simplied Trades extraction
Modified: pkg/blotter/R/chart.Posn.R
===================================================================
--- pkg/blotter/R/chart.Posn.R 2011-01-07 17:14:22 UTC (rev 530)
+++ pkg/blotter/R/chart.Posn.R 2011-01-14 16:42:23 UTC (rev 531)
@@ -35,8 +35,10 @@
tzero = xts(0,order.by=index(Prices[1,]))
# Prices=align.time(Prices,n)
- Trades = Portfolio$symbols[[Symbol]]$txn$Txn.Price*Portfolio$symbols[[Symbol]]$txn$Txn.Qty
- Buys = Portfolio$symbols[[Symbol]]$txn$Txn.Price[which(Trades>0)]
+ #Trades = Portfolio$symbols[[Symbol]]$txn$Txn.Price*Portfolio$symbols[[Symbol]]$txn$Txn.Qty
+ Trades = Portfolio$symbols[[Symbol]]$txn$Txn.Value
+
+ Buys = Portfolio$symbols[[Symbol]]$txn$Txn.Price[which(Trades>0)]
# Buys = align.time(rbind(Buys,tzero),n)[-1]
Sells = Portfolio$symbols[[Symbol]]$txn$Txn.Price[which(Trades<0)]
# Sells = align.time(rbind(Sells,tzero),n)[-1]
More information about the Blotter-commits
mailing list