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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Jul 27 02:54:14 CEST 2014


Author: bodanker
Date: 2014-07-27 02:54:14 +0200 (Sun, 27 Jul 2014)
New Revision: 1625

Modified:
   pkg/quantstrat/R/ruleSignal.R
Log:
- Revert bug accidentally introduced in r1594


Modified: pkg/quantstrat/R/ruleSignal.R
===================================================================
--- pkg/quantstrat/R/ruleSignal.R	2014-07-12 18:23:21 UTC (rev 1624)
+++ pkg/quantstrat/R/ruleSignal.R	2014-07-27 00:54:14 UTC (rev 1625)
@@ -217,10 +217,8 @@
                               orderprice=as.numeric(orderprice))
         }
 
-        if(!is.null(orderqty) && orderqty!=0 && length(orderprice) && is.numeric(orderprice[1])) #orderprice could have length > 1
+        if(!is.null(orderqty) && orderqty!=0 && length(orderprice))
         {
-          if(orderqty != 'all' || getPosQty(portfolio, symbol, timestamp) != 0)
-             {
                 addOrder(portfolio=portfolio, 
                          symbol=symbol, 
                          timestamp=timestamp, 
@@ -239,7 +237,6 @@
                          TxnFees=TxnFees,
                          label=label,
 			                   time.in.force=time.in.force)
-            }
         }
     }
     if(sethold) hold <<- TRUE



More information about the Blotter-commits mailing list