[Blotter-commits] r1447 - pkg/quantstrat/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Apr 24 18:00:40 CEST 2013


Author: braverock
Date: 2013-04-24 18:00:39 +0200 (Wed, 24 Apr 2013)
New Revision: 1447

Modified:
   pkg/quantstrat/R/tradeOrderStats.R
Log:
- fix variable names after changing punctuation.  thanks to Scott Schmidt for pointing out.


Modified: pkg/quantstrat/R/tradeOrderStats.R
===================================================================
--- pkg/quantstrat/R/tradeOrderStats.R	2013-04-23 22:40:03 UTC (rev 1446)
+++ pkg/quantstrat/R/tradeOrderStats.R	2013-04-24 16:00:39 UTC (rev 1447)
@@ -41,8 +41,8 @@
 #' @export
 tradeOrderStats <- function(portfolio, symbol, ...) {
 	stats.table <- perTradeStats(Portfolio=portfolio,Symbol=symbol,...)
-	stats.xts <- as.xts(stats_table, order.by=stats.table$End)
-	orderbook <- getOrderBook(portfolio=Portfolio)[[Portfolio]][[symbol]]
+	stats.xts <- as.xts(stats.table, order.by=stats.table$End)
+	orderbook <- getOrderBook(portfolio=portfolio)[[portfolio]][[symbol]]
 	closed <- orderbook[which(orderbook$Order.Status=='closed'),]
 	closed.xts <- xts(closed, as.POSIXct(as.vector(closed$Order.StatusTime), format='%Y-%m-%d %H:%M:%OS'))
 	merged.table <- merge(closed.xts,stats.xts)



More information about the Blotter-commits mailing list