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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Feb 4 18:14:17 CET 2010


Author: braverock
Date: 2010-02-04 18:14:17 +0100 (Thu, 04 Feb 2010)
New Revision: 227

Modified:
   pkg/quantstrat/R/indicators.R
   pkg/quantstrat/R/signals.R
Log:
add enabled check to signals/indicators processing

Modified: pkg/quantstrat/R/indicators.R
===================================================================
--- pkg/quantstrat/R/indicators.R	2010-02-04 16:29:07 UTC (rev 226)
+++ pkg/quantstrat/R/indicators.R	2010-02-04 17:14:17 UTC (rev 227)
@@ -61,6 +61,8 @@
             }
         }
         
+        if(!is.true(indicator$enabled)) next()
+        
         # see 'S Programming p. 67 for this matching
         fun<-match.fun(indicator$name)
         .formals  <- formals(fun)

Modified: pkg/quantstrat/R/signals.R
===================================================================
--- pkg/quantstrat/R/signals.R	2010-02-04 16:29:07 UTC (rev 226)
+++ pkg/quantstrat/R/signals.R	2010-02-04 17:14:17 UTC (rev 227)
@@ -63,6 +63,8 @@
                 signal$name<-paste("sig",signal$name,sep='.')
             }
         }
+ 
+        if(!is.true(signal$enabled)) next()
         
         # see 'S Programming p. 67 for this matching
         fun<-match.fun(signal$name)



More information about the Blotter-commits mailing list