[R-SIG-Finance] Customized indicator for quantstrat

Robert A'gata rhelpacc at gmail.com
Sat Dec 15 05:56:08 CET 2012


Hi,

I am trying to learn how to create customized indicator. Mostly I have my
own recipe which TTR does not cover. I only know that the indicator
function is supposed to return xts. But I couldn't get it to work on my
example. I attached the file here. The customized indicator function is
called "devCalc" which calculates deviation between current price and a
given VWAP. Then normalized with volatility. I named the indicator as "dev"
in add.indicator's label. R complains that no "dev" found when I try to use
it to define my signal. Any help would be appreciated. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20121214/a26edd03/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LearningQuantStrats.R
Type: application/octet-stream
Size: 3013 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20121214/a26edd03/attachment.obj>


More information about the R-SIG-Finance mailing list