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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jun 13 16:18:00 CEST 2011


Author: gsee
Date: 2011-06-13 16:18:00 +0200 (Mon, 13 Jun 2011)
New Revision: 627

Modified:
   pkg/quantstrat/R/orders.R
Log:
patch for long exit order qty adjustment

Modified: pkg/quantstrat/R/orders.R
===================================================================
--- pkg/quantstrat/R/orders.R	2011-06-11 22:17:21 UTC (rev 626)
+++ pkg/quantstrat/R/orders.R	2011-06-13 14:18:00 UTC (rev 627)
@@ -604,8 +604,8 @@
                 remqty<-orderQty+pos
                 if(side=="long"){
                     if (remqty<0){
-                        newqty<-orderQty-remqty
-                        warning("orderQty of",orderQty,"would cross through zero, reducing qty to",newqty)
+                        newqty<-orderQty+remqty
+                        warning("orderQty of ",orderQty," would cross through zero, reducing qty to ",newqty)
                         orderQty<-newqty
                     }
                 } else {



More information about the Blotter-commits mailing list