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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Apr 1 18:02:29 CEST 2013


Author: opentrades
Date: 2013-04-01 18:02:29 +0200 (Mon, 01 Apr 2013)
New Revision: 1420

Modified:
   pkg/quantstrat/demo/luxor.1.R
   pkg/quantstrat/demo/luxor.2.R
Log:
- fix second SMA to use onlye the first Cl() column



Modified: pkg/quantstrat/demo/luxor.1.R
===================================================================
--- pkg/quantstrat/demo/luxor.1.R	2013-04-01 15:51:06 UTC (rev 1419)
+++ pkg/quantstrat/demo/luxor.1.R	2013-04-01 16:02:29 UTC (rev 1420)
@@ -74,7 +74,7 @@
 
 add.indicator(s, name = "SMA",
 	arguments = list(
-		x = quote(Cl(mktdata)),
+		x = quote(Cl(mktdata)[,1]),
 		n = .fast
 	),
 	label="nFast"
@@ -82,7 +82,7 @@
 
 add.indicator(s, name="SMA",
 	arguments = list(
-		x = quote(Cl(mktdata)),
+		x = quote(Cl(mktdata)[,1]),
 		n = .slow
 	),
 	label="nSlow"

Modified: pkg/quantstrat/demo/luxor.2.R
===================================================================
--- pkg/quantstrat/demo/luxor.2.R	2013-04-01 15:51:06 UTC (rev 1419)
+++ pkg/quantstrat/demo/luxor.2.R	2013-04-01 16:02:29 UTC (rev 1420)
@@ -74,7 +74,7 @@
 
 add.indicator(s, name = "SMA",
 	arguments = list(
-		x = quote(Cl(mktdata)),
+		x = quote(Cl(mktdata)[,1]),
 		n = .fast
 	),
 	label="nFast"
@@ -82,7 +82,7 @@
 
 add.indicator(s, name="SMA",
 	arguments = list(
-		x = quote(Cl(mktdata)),
+		x = quote(Cl(mktdata)[,1]),
 		n = .slow
 	),
 	label="nSlow"



More information about the Blotter-commits mailing list