[R-SIG-Finance] SMA of RSI

Joshua Ulrich josh.m.ulrich at gmail.com
Mon Feb 27 20:52:30 CET 2017


On Mon, Feb 27, 2017 at 1:49 PM, John Klingensmith <johnsk00 at gmail.com> wrote:
> Hi,
>  How do take a simple moving average of an indicator, like a 5 period SMA
> of a 3 period RSI?
>
Have you tried anything?

What's wrong with something straight-forward and simple like:

R> require(TTR)
Loading required package: TTR
R> data(ttrc)
R> RSI.SMA <- SMA(RSI(ttrc$Close, 3), 5)
R> tail(RSI.SMA)
[1] 56.32127 42.49744 38.26578 37.85953 39.58722 43.33587


> Best,
>  John
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.



-- 
Joshua Ulrich  |  about.me/joshuaulrich
FOSS Trading  |  www.fosstrading.com
R/Finance 2017 | www.rinfinance.com



More information about the R-SIG-Finance mailing list