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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Sep 5 01:55:44 CEST 2012


Author: opentrades
Date: 2012-09-05 01:55:44 +0200 (Wed, 05 Sep 2012)
New Revision: 1154

Modified:
   pkg/quantstrat/R/ruleOrderProc.R
Log:
fixed bug in stoptrailing (was single & where double && was required)



Modified: pkg/quantstrat/R/ruleOrderProc.R
===================================================================
--- pkg/quantstrat/R/ruleOrderProc.R	2012-09-04 22:08:41 UTC (rev 1153)
+++ pkg/quantstrat/R/ruleOrderProc.R	2012-09-04 23:55:44 UTC (rev 1154)
@@ -242,7 +242,7 @@
                         } 
                         if(isOHLCmktdata){
                             # check to see if price moved through the limit
-                            if( orderPrice > as.numeric(Lo(mktdataTimestamp)) &
+                            if( orderPrice > as.numeric(Lo(mktdataTimestamp)) &&
                                 orderPrice < as.numeric(Hi(mktdataTimestamp)) ) 
                             {
                                 txnprice = orderPrice



More information about the Blotter-commits mailing list