rsi {cryptoQuotes}R Documentation

Add RSI indicators to your chart

Description

[Experimental]

The RSI can be customized with different look-back periods to suit various trading strategies and timeframes. It is a valuable tool for assessing the momentum and relative strength of an asset, helping traders make more informed decisions in financial markets.

Usage

rsi(
  n = 14,
  maType = "SMA",
  upper_limit = 80,
  lower_limit = 20,
  internal = list(),
  ...
)

Arguments

n

Number of periods for moving averages.

maType

Either:

  1. A function or a string naming the function to be called.

  2. A list with the first component like (1) above, and additional parameters specified as named components. See Examples.

upper_limit

A numeric-vector of length 1. 80 by default. Sets the upper limit of the TTR::RSI.

lower_limit

A numeric-vector of length 1. 20 by default. Sets the lower limit of the TTR::RSI.

internal

An empty list. Used for internal purposes. Ignore.

...

Other arguments to be passed to the maType function in case (1) above.

Value

Invisbly returns a plotly object.

See Also

Other chart indicators: add_event(), alma(), bollinger_bands(), chart(), dema(), ema(), evwma(), fgi(), hma(), lsr(), macd(), sma(), volume(), vwap(), wma(), zlema()

Other subcharts: add_event(), fgi(), lsr(), macd(), volume()

Examples

# script: scr_charting
# date: 2023-10-25
# author: Serkan Korkmaz, serkor1@duck.com
# objective: Charting in general
# script start;

## charting the klines
## with indicators as
## subcharts
chart(
  ticker     = BTC,
  main       = kline(),
  sub        = list(
    volume(),
    macd()
  ),
  indicator = list(
    bollinger_bands(),
    sma(),
    alma()
  ),
  options = list(
    dark = TRUE,
    deficiency = FALSE
  )
)

## charting the MACD-indicator
## with klines as subcharts
chart(
  ticker     = BTC,
  main       = macd(),
  sub        = list(
    volume(),
    kline()
  ),
  indicator = list(
    bollinger_bands(),
    sma()
  ),
  options = list(
    dark = TRUE,
    deficiency = FALSE
  )
)

# script end;

[Package cryptoQuotes version 1.3.0 Index]