rsi {cryptoQuotes} | R Documentation |
Chart the Relative Strength Index (RSI)
Description
A high-level plotly::plot_ly()
- and plotly::add_lines()
-function that
interacts with the TTR::RSI()
-function.
The function adds a subchart with a TTR::RSI()
-indicator.
Usage
rsi(
price = "close",
n = 14,
maType = "SMA",
upper_limit = 80,
lower_limit = 20,
color = '#4682b4',
...
)
Arguments
price |
Price series that is coercible to xts or matrix. |
n |
Number of periods for moving averages. |
maType |
Either:
|
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. |
color |
|
... |
For internal use. Please ignore. |
Value
An invisible plotly::plot_ly()
-object.
Author(s)
Serkan Korkmaz
See Also
Other chart indicators:
add_event()
,
alma()
,
bollinger_bands()
,
chart()
,
dema()
,
donchian_channel()
,
ema()
,
evwma()
,
fgi()
,
hma()
,
lsr()
,
macd()
,
sma()
,
smi()
,
volume()
,
vwap()
,
wma()
,
zlema()
Other subchart indicators:
add_event()
,
fgi()
,
lsr()
,
macd()
,
smi()
,
volume()
Other momentum indicators:
macd()
,
smi()
Examples
# script start;
# 1) charting weekly
# BTC using candlesticks
# and indicators
cryptoQuotes::chart(
ticker = BTC,
main = cryptoQuotes::kline(),
sub = list(
cryptoQuotes::volume(),
cryptoQuotes::macd()
),
indicator = list(
cryptoQuotes::bollinger_bands(),
cryptoQuotes::sma(),
cryptoQuotes::alma()
),
options = list(
dark = TRUE,
deficiency = FALSE
)
)
# script end;