[Blotter-commits] r1618 - pkg/quantstrat/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Jul 3 20:19:59 CEST 2014
Author: bodanker
Date: 2014-07-03 20:19:59 +0200 (Thu, 03 Jul 2014)
New Revision: 1618
Modified:
pkg/quantstrat/R/ruleSignal.R
Log:
- Patch check for orderprice with length > 1. Thanks to Joe Dunn for the report.
Modified: pkg/quantstrat/R/ruleSignal.R
===================================================================
--- pkg/quantstrat/R/ruleSignal.R 2014-06-28 15:00:02 UTC (rev 1617)
+++ pkg/quantstrat/R/ruleSignal.R 2014-07-03 18:19:59 UTC (rev 1618)
@@ -194,7 +194,7 @@
) # end switch
if(inherits(orderprice,'try-error')) orderprice<-NULL
- if(length(orderprice>1) && !pricemethod=='maker') orderprice<-last(orderprice[timestamp])
+ if(length(orderprice)>1 && pricemethod!='maker') orderprice <- last(orderprice[timestamp])
if(!is.null(orderprice) && !is.null(ncol(orderprice))) orderprice <- orderprice[,1]
}
More information about the Blotter-commits
mailing list