A high-level plotly::plot_ly()
- and plotly::add_lines()
-function that
interacts with the TTR::MACD()
-function. The function adds subchart with a
TTR::MACD()
-indicator.
Arguments
- nFast
Number of periods for fast moving average.
- nSlow
Number of periods for slow moving average.
- nSig
Number of periods for signal moving average.
- maType
Either:
A function or a string naming the function to be called.
A list with the first component like (1) above, and additional parameters specified as named components. See Examples.
- percent
logical; if
TRUE
, the percentage difference between the fast and slow moving averages is returned, otherwise the difference between the respective averages is returned.- ...
For internal use. Please ignore.
Value
An invisible plotly::plot_ly()
-object.
See also
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;