macd {cryptoQuotes} | R Documentation |
Chart the Moving Average Convergence Divergence (MACD) indicator
Description
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.
Usage
macd(
nFast = 12,
nSlow = 26,
nSig = 9,
maType = "SMA",
percent = TRUE,
...
)
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:
|
percent |
logical; if |
... |
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()
,
rsi()
,
sma()
,
smi()
,
volume()
,
vwap()
,
wma()
,
zlema()
Other subchart indicators:
add_event()
,
fgi()
,
lsr()
,
rsi()
,
smi()
,
volume()
Other momentum indicators:
rsi()
,
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;