RSI: Relative Strength Index

View source: R/avfintools.R

RSIR Documentation

Relative Strength Index

Description

Returns the Relative Strength Index with adjustable periods

Usage

RSI(df, periods, current = FALSE, pricechange = NULL, hideprints = TRUE)

Arguments

df

Dataframe with price data

periods

Calculation Period

current

If one wants to input the latest price point before data updates, RSI uses the percentage return at the end of the market hours

pricechange

Input in percentage

hideprints

If TRUE, hides printouts from the current message

Value

Returns a vector of RSI calculations in dataframe format. If current = TRUE, returns the most recent RSI.

Examples

RSI(SPY15, 14)
RSI(tail(SPYdaily,200), 14, current = TRUE, pricechange = 1.3)

avfintools documentation built on Oct. 6, 2022, 5:14 p.m.