macd {cryptoQuotes} | R Documentation |
Traders and investors use the MACD indicator to identify trend changes, potential reversals, and overbought or oversold conditions in the market. It is a versatile tool that can be applied to various timeframes and asset classes, making it a valuable part of technical analysis for many traders.
macd(
nFast = 12,
nSlow = 26,
nSig = 9,
maType = "SMA",
percent = TRUE,
internal = list(),
...
)
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 |
internal |
An empty list. Used for internal purposes. Ignore. |
... |
Other arguments to be passed to the |
Invisbly returns a plotly object.
Other chart indicators:
add_event()
,
alma()
,
bollinger_bands()
,
chart()
,
dema()
,
ema()
,
evwma()
,
fgi()
,
hma()
,
lsr()
,
rsi()
,
sma()
,
volume()
,
vwap()
,
wma()
,
zlema()
Other subcharts:
add_event()
,
fgi()
,
lsr()
,
rsi()
,
volume()
# 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;