Displaying 1 result from an estimated 1 matches for "mafast".
Did you mean:
rafast
2012 Jul 24
1
quantstrat questions
...quot;)
How would I modify the rules below to enter when ma50 greater than both ma160 and ma200 and exit when ma50 is below both ma160 and ma200?
#Add rules to a strategy
stratName <- add.rule(strategy = stratName,name='ruleSignal', arguments =
list(sigcol="maFast.gt.maSlow",sigval=TRUE, orderqty=100, ordertype='market', orderside='long'),type='enter')
stratName <- add.rule(strategy = stratName,name='ruleSignal', arguments =
list(sigcol="maFast.lt.maSlow",sigval=TRUE, orderqty='all', o...