RSI(price, ma.up=list("EMA", n=14, wilder=TRUE), ma.down=ma.up)
ma.up
, but for the downward price movement moving average.RSI = 100 - 100 / ( 1 + RS )
, where RS
is the smoothed
ratio of n
not the number of gain/loss periods.EMA
, SMA
, etc. for moving average options; and note
Warning section. See CMO
for a variation on RSI.data(ttrc)
rsi <- RSI(ttrc[,"Close"])
Run the code above in your browser using DataLab