[Blotter-commits] r418 - pkg/quantstrat/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Oct 12 15:39:59 CEST 2010
Author: llevenson
Date: 2010-10-12 15:39:58 +0200 (Tue, 12 Oct 2010)
New Revision: 418
Modified:
pkg/quantstrat/R/orders.R
Log:
- Changed > to >= for length(price)
Modified: pkg/quantstrat/R/orders.R
===================================================================
--- pkg/quantstrat/R/orders.R 2010-10-12 13:27:10 UTC (rev 417)
+++ pkg/quantstrat/R/orders.R 2010-10-12 13:39:58 UTC (rev 418)
@@ -199,7 +199,7 @@
if(!is.null(side) & !length(grep(side,c('long','short')))==1) stop(paste("side:",side," must be one of 'long' or 'short'"))
if(is.na(charmatch(ordertype,c("market","limit","stoplimit","stoptrailing")))) stop(paste("ordertype:",ordertype,' must be one of "market","limit","stoplimit",or "stoptrailing"'))
- if(!is.null(threshold) & length(price)>1 ) {
+ if(!is.null(threshold) & length(price)>=1 ) {
if(length(grep(ordertype,c("stoplimit","stoptrailing")))==1) {
#we have a threshold set on a stop* order, process it
switch(ordertype,
More information about the Blotter-commits
mailing list