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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jun 4 16:24:07 CEST 2014


Author: efmrforge
Date: 2014-06-04 16:24:06 +0200 (Wed, 04 Jun 2014)
New Revision: 1613

Modified:
   pkg/quantstrat/demo/macd.R
Log:
Saved, set, then unset timezone


Modified: pkg/quantstrat/demo/macd.R
===================================================================
--- pkg/quantstrat/demo/macd.R	2014-05-22 10:06:24 UTC (rev 1612)
+++ pkg/quantstrat/demo/macd.R	2014-06-04 14:24:06 UTC (rev 1613)
@@ -15,6 +15,13 @@
 suppressWarnings(rm("account.macd","portfolio.macd",pos=.blotter))
 suppressWarnings(rm("account.st","portfolio.st","stock.str","stratMACD","initDate","initEq",'start_t','end_t'))
 
+#correct for TZ issues if they crop up
+oldtz<-Sys.getenv('TZ')
+if(oldtz=='') {
+        Sys.setenv(TZ="GMT")
+}
+
+
 stock.str='AAPL' # what are we trying it on
 
 #MA parameters for MACD



More information about the Blotter-commits mailing list