[Blotter-commits] r1361 - pkg/quantstrat/demo

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jan 15 17:30:50 CET 2013


Author: braverock
Date: 2013-01-15 17:30:50 +0100 (Tue, 15 Jan 2013)
New Revision: 1361

Modified:
   pkg/quantstrat/demo/maCross.R
Log:
- check for existence of in_test for supporting test wrappers

Modified: pkg/quantstrat/demo/maCross.R
===================================================================
--- pkg/quantstrat/demo/maCross.R	2013-01-15 15:08:58 UTC (rev 1360)
+++ pkg/quantstrat/demo/maCross.R	2013-01-15 16:30:50 UTC (rev 1361)
@@ -20,7 +20,8 @@
 currency('USD')
 stock(stock.str,currency='USD',multiplier=1)
 
-if(!isTRUE(in_test)){
+#specify initDate and endDate if we're not inside the test wrappers
+if(!exists('in_test') || !isTRUE(in_test)){
     initDate='2005-12-31'
     endDate=Sys.Date()
 }



More information about the Blotter-commits mailing list