[Blotter-commits] r641 - pkg/quantstrat/demo

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Jun 25 22:18:41 CEST 2011


Author: gsee
Date: 2011-06-25 22:18:41 +0200 (Sat, 25 Jun 2011)
New Revision: 641

Modified:
   pkg/quantstrat/demo/pair_trade.R
Log:
for now, using replace=FALSE to avoid calling updateOrders with incorrect orderside.

Modified: pkg/quantstrat/demo/pair_trade.R
===================================================================
--- pkg/quantstrat/demo/pair_trade.R	2011-06-24 19:02:48 UTC (rev 640)
+++ pkg/quantstrat/demo/pair_trade.R	2011-06-25 20:18:41 UTC (rev 641)
@@ -156,7 +156,7 @@
 	if (!is.null(orderqty) & !orderqty == 0 & !is.null(orderprice)) {
             addOrder(portfolio = portfolio, symbol = symbol, 
                 timestamp = timestamp, qty = orderqty, price = as.numeric(orderprice), 
-                ordertype = ordertype, side = orderside, 
+                ordertype = ordertype, side = orderside, replace = FALSE,
                 status = "open", ... = ...)
     }
 	return(0) #so that ruleSignal function doesn't also try to place an order



More information about the Blotter-commits mailing list