momentum.RSI: Use RSI to calculate a momentum indicator

Description Usage Arguments Details See Also Examples

View source: R/MomentumTest.R

Description

Use RSI (Relative Strength Index) to calculate a momentum indicator

Usage

1

Arguments

y

Price series that is coercible to xts or matrix

n

Number of periods for moving averages.

Details

The RSI calculation is RSI = 100 - 100 / ( 1 + RS ), where RS is the smoothed ratio of 'average' gains over 'average' losses. The 'averages' aren't true averages, since they're divided by the value of n and not the number of periods in which there are gains/losses.

RSI > 70 means the asset is overvalued and overbought (go short)

RSI < 30 means the asset is undervalued and underbought (go long)

See Also

momentum.MACD

momentum.Crossover

Examples

1
2
y = AUDUSD
momRSI <- momentum.RSI(y)

ivanliu1989/RQuantTrader documentation built on Sept. 13, 2019, 11:54 a.m.