View source: R/chart_bollingerbands.R
bollinger_bands | R Documentation |
A high-level plotly::add_lines()
-wrapper function that interacts
with the TTR::BBands()
-function. The function adds bollinger bands
to the main chart()
.
bollinger_bands(
n = 20,
sd = 2,
maType = "SMA",
color = '#4682b4',
...
)
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 |
A character-vector of length 1. "#4682b4" by default. |
... |
Other arguments to be passed to the |
An invisible plotly::plot_ly()
-object.
Serkan Korkmaz
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()
# script start;
# Charting BTC using
# candlesticks as main
# chart
cryptoQuotes::chart(
ticker = BTC,
main = cryptoQuotes::kline(),
sub = list(
cryptoQuotes::volume()
)
)
# script end;
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.