rsi

Calculate RSI (Relative Strength Index)

Syntax

Fields

Description

symbol(str)

Symbol to perform calculation on. Defaults to the first symbol in watchlist

period(int)

Period of RSI. Defaults to 14

interval(str)

Interval to perform the calculation. Defaults to interval of algorithm

ref(str)

'close', 'open', 'high', or 'low'. Defaults to 'close'

prices(list)

When specified, this function will use the values provided in the list to perform calculations and ignore other parameters. Defaults to None

def rsi(
    self,
    symbol: str = None,
    period: int = 14,
    interval: str = None,
    ref: str = "close",
    prices=None,
) -> np.array:

Returns

Returns a numpy array containing the RSI values.

Raises