| smi | R Documentation |
A high-level plotly::plot_ly()- and plotly::add_lines()-function that
interacts with the TTR::SMI()-function.
The function adds a subchart with a TTR::SMI()-indicator.
smi(
nFastK = 14,
nFastD = 3,
nSlowD = 3,
maType,
bounded = TRUE,
smooth = 1,
upper_limit = 40,
lower_limit = -40,
color = "#4682b4",
...
)
nFastK |
Number of periods for fast %K (i.e. the number of past periods to use). |
nFastD |
Number of periods for fast %D (i.e. the number smoothing periods to apply to fast %K). |
nSlowD |
Number of periods for slow %D (i.e. the number smoothing periods to apply to fast %D). |
maType |
Either:
|
bounded |
Logical, should current period's values be used in the calculation? |
smooth |
Number of internal smoothing periods to be applied before calculating FastK. See Details. |
upper_limit |
A numeric-vector of length 1. 40 by default. Sets the upper limit of the TTR::SMI. |
lower_limit |
A numeric-vector of length 1. -40 by default. Sets the lower limit of the TTR::SMI. |
color |
A character-vector of length 1. "#4682b4" by default. |
... |
For internal use. Please ignore. |
An invisible plotly::plot_ly()-object.
Serkan Korkmaz
Other chart indicators:
add_event(),
alma(),
bollinger_bands(),
chart(),
dema(),
donchian_channel(),
ema(),
evwma(),
fgi(),
hma(),
lsr(),
macd(),
rsi(),
sma(),
volume(),
vwap(),
wma(),
zlema()
Other subchart indicators:
add_event(),
fgi(),
lsr(),
macd(),
rsi(),
volume()
Other momentum indicators:
macd(),
rsi()
# 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;
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.