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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Sep 28 00:39:00 CEST 2012


Author: opentrades
Date: 2012-09-28 00:39:00 +0200 (Fri, 28 Sep 2012)
New Revision: 1197

Modified:
   pkg/quantstrat/R/orders.R
Log:
- excluded limit orders from possible sign reversal



Modified: pkg/quantstrat/R/orders.R
===================================================================
--- pkg/quantstrat/R/orders.R	2012-09-27 20:16:37 UTC (rev 1196)
+++ pkg/quantstrat/R/orders.R	2012-09-27 22:39:00 UTC (rev 1197)
@@ -263,7 +263,7 @@
                             threshold = price*threshold
                             tmult=FALSE
                         } 
-                        if(!is.null(side)&& ordertype!='iceberg'){
+                        if(!is.null(side)&& ordertype!='iceberg' && ordertype!='limit'){
                             #check to make sure the order wouldn't instantly cross, reverse threshold if that's the case
                             if(side=='long') {
                                 #this is a stop exit, so it will sell *lower* than the current market



More information about the Blotter-commits mailing list