RSI: Relative Strength Index
The Relative Strength Index (RSI) calculates a ratio of the recent upward price movements to the absolute price movement. Developed by J. Welles Wilder.
Price series that is coercible to xts or matrix.RSI指标带有通道和信号箭头
Number of periods for moving averages.
A function or a string naming the function to be called.
A list with the first component like (1) above, and RSI指标带有通道和信号箭头 additional parameters specified as named components. See Examples.
Other arguments to be passed to the maType function in case (1) above.
A object of the same class as price or a vector (if try.xts fails) RSI指标带有通道和信号箭头 containing the RSI values.
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 RSI指标带有通道和信号箭头 true averages, since they're divided by the value of n and not the number of periods in which there are gains/losses.
See EMA , SMA , etc. for moving average options; and note Warning section. See CMO for a variation on RSI.