bollinger_bands {cryptoQuotes} | R Documentation |
Add Bollinger Bands to the chart
Description
A high-level plotly::add_lines()
-wrapper function that interacts
with the TTR::BBands()
-function. The function adds bollinger bands
to the main chart()
.
Usage
bollinger_bands(
n = 20,
sd = 2,
maType = "SMA",
color = '#4682b4',
...
)
Arguments
n |
Number of periods for moving average. |
sd |
The number of standard deviations to use. |
maType |
A function or a string naming the function to be called. |
color |
|
... |
Other arguments to be passed to the |
Value
An invisible plotly::plot_ly()
-object.
Author(s)
Serkan Korkmaz
See Also
Other chart indicators:
add_event()
,
alma()
,
chart()
,
dema()
,
donchian_channel()
,
ema()
,
evwma()
,
fgi()
,
hma()
,
lsr()
,
macd()
,
rsi()
,
sma()
,
smi()
,
volume()
,
vwap()
,
wma()
,
zlema()
Other main chart indicators:
add_event()
,
alma()
,
dema()
,
donchian_channel()
,
ema()
,
evwma()
,
hma()
,
sma()
,
vwap()
,
wma()
,
zlema()
Examples
# script start;
# Charting BTC using
# candlesticks as main
# chart
cryptoQuotes::chart(
ticker = BTC,
main = cryptoQuotes::kline(),
sub = list(
cryptoQuotes::volume()
)
)
# script end;
[Package cryptoQuotes version 1.3.1 Index]