[Blotter-commits] r965 - pkg/quantstrat/demo
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Mar 5 17:05:31 CET 2012
Author: braverock
Date: 2012-03-05 17:05:30 +0100 (Mon, 05 Mar 2012)
New Revision: 965
Modified:
pkg/quantstrat/demo/macd.R
Log:
- comment stoplimit until I can get them fixed
Modified: pkg/quantstrat/demo/macd.R
===================================================================
--- pkg/quantstrat/demo/macd.R 2012-03-04 21:10:35 UTC (rev 964)
+++ pkg/quantstrat/demo/macd.R 2012-03-05 16:05:30 UTC (rev 965)
@@ -50,7 +50,7 @@
stratMACD <- add.signal(strategy = stratMACD,name="sigThreshold",arguments = list(column="signal",relationship="lt",threshold=0,cross=TRUE),label="signal.lt.zero")
stratMACD <- add.rule(strategy = stratMACD,name='ruleSignal', arguments = list(sigcol="signal.gt.zero",sigval=TRUE, orderqty=100, ordertype='market', orderside='long', threshold=NULL),type='enter')
-stratMACD <- add.rule(strategy = stratMACD,name='ruleSignal', arguments = list(sigcol="signal.gt.zero",sigval=TRUE, orderqty=-100, ordertype='stoplimit', orderside='long', threshold=.85,tmult=TRUE),type='risk')
+#stratMACD <- add.rule(strategy = stratMACD,name='ruleSignal', arguments = list(sigcol="signal.gt.zero",sigval=TRUE, orderqty=-100, ordertype='stoplimit', orderside='long', threshold=.85,tmult=TRUE),type='risk')
# alternately, use a trailing order
# stratMACD <- add.rule(strategy = stratMACD,name='ruleSignal', arguments = list(sigcol="signal.gt.zero",sigval=TRUE, orderqty=-100, ordertype='stoptrailing', orderside='long', threshold=.9,tmult=TRUE),type='risk')
stratMACD <- add.rule(strategy = stratMACD,name='ruleSignal', arguments = list(sigcol="signal.lt.zero",sigval=TRUE, orderqty='all', ordertype='market', orderside='long', threshold=NULL),type='exit')
More information about the Blotter-commits
mailing list