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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Feb 26 14:56:01 CET 2010


Author: braverock
Date: 2010-02-26 14:56:01 +0100 (Fri, 26 Feb 2010)
New Revision: 267

Modified:
   pkg/quantstrat/demo/simplestrat.R
Log:
- wrap BBands in plot so it will graph from inside function scope like 'source' or 'demo'

Modified: pkg/quantstrat/demo/simplestrat.R
===================================================================
--- pkg/quantstrat/demo/simplestrat.R	2010-02-26 13:52:39 UTC (rev 266)
+++ pkg/quantstrat/demo/simplestrat.R	2010-02-26 13:56:01 UTC (rev 267)
@@ -47,7 +47,7 @@
 end_t-start_t
 updatePortf(Portfolio='simplestrat',Dates=paste('::',as.Date(Sys.time()),sep=''))
 chart.Posn(Portfolio='simplestrat',Symbol='IBM',theme='white')
-addBBands(on=1,sd=2,n=10)
+plot(addBBands(on=1,sd=2,n=10))
 ###############################################################################
 # R (http://r-project.org/) Quantitative Strategy Model Framework
 #



More information about the Blotter-commits mailing list