[Blotter-commits] r697 - pkg/quantstrat/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Jul 23 02:06:37 CEST 2011
Author: gsee
Date: 2011-07-23 02:06:37 +0200 (Sat, 23 Jul 2011)
New Revision: 697
Modified:
pkg/quantstrat/R/rules.R
Log:
put back a decrement I took out in revision 616. I think this fixes issues with stoplimit not firing.
Modified: pkg/quantstrat/R/rules.R
===================================================================
--- pkg/quantstrat/R/rules.R 2011-07-22 21:37:34 UTC (rev 696)
+++ pkg/quantstrat/R/rules.R 2011-07-23 00:06:37 UTC (rev 697)
@@ -402,7 +402,7 @@
cross<-sigThreshold(label='tmpstop',column=col,threshold=tmpprice,relationship=relationship)
if(any(cross[timespan])){
# find first index that would cross after this index
- newidx <- curIndex + which(cross[timespan])[1]
+ newidx <- curIndex + which(cross[timespan])[1] - 1
# insert that into dindex
assign.dindex(c(get.dindex(),newidx))
}
More information about the Blotter-commits
mailing list