[R-SIG-Finance] Using quantstrat indicators against columns other than "Close"
drseergio at gmail.com
Fri Feb 10 17:26:52 CET 2012
I have started using 'quantstrat' to model strategies and cannot
figure out a way to add an indicator that would be calculated against
a column other than "Close". For example, in the code below I create a
s <- add.indicator(strategy=s, name='SMA',
arguments=list(x=quote(Cl(mktdata)), n=5), label='SMA5')
This creates a column with 5-day SMA calculated for the closing price
of the instrument. What is the correct approach of using indicators
against other columns, such as "Volume"?
Appreciate your help.
More information about the R-SIG-Finance