Skip to contents

[Experimental]

A high-level plotly::add_lines()-wrapper function that interacts with {TTR}'s moving average family of functions. The function adds moving average indicators to the main chart().

Usage

zlema(
 price  = "close",
 n      = 10,
 ratio = NULL,
 ...
)

Arguments

price

A character-vector of length 1. "close" by default. The name of the vector to passed into TTR::ZLEMA().

n

Number of periods to average over. Must be between 1 and nrow(x), inclusive.

ratio

A smoothing/decay ratio. ratio overrides wilder in EMA.

...

For internal use. Please ignore.

Value

A plotly::plot_ly()-object

See also

Other chart indicators: add_event(), alma(), bollinger_bands(), chart(), dema(), donchian_channel(), ema(), evwma(), fgi(), hma(), lsr(), macd(), rsi(), sma(), smi(), volume(), vwap(), wma()

Other moving average indicators: alma(), dema(), ema(), evwma(), hma(), sma(), vwap(), wma()

Other main chart indicators: add_event(), alma(), bollinger_bands(), dema(), donchian_channel(), ema(), evwma(), hma(), sma(), vwap(), wma()

Author

Serkan Korkmaz

Examples

# script start;

cryptoQuotes::chart(
  ticker = BTC,
  main   = kline(),
  indicator = list(
    cryptoQuotes::ema(n = 7),
    cryptoQuotes::sma(n = 14),
    cryptoQuotes::wma(n = 21)
  )
)
Jan 2023Mar 2023May 2023Jul 2023Sep 2023Nov 202315k20k25k30k35k40k45k
Indicators:1w EMA(7)SMA(14)WMA(21)Ticker: BTC Market: Bybit (SPOT)Period: 2023-01-02 01:00:00 - 2023-12-25 01:00:00Click to enter X axis titleClick to enter Y axis title
# script end;