addMA | R Documentation |
Add one or more moving averages to a chart.
addSMA(n = 10, on = 1, with.col = Cl, overlay = TRUE, col = "brown")
addEMA(n = 10, wilder = FALSE, ratio=NULL, on = 1,
with.col = Cl, overlay = TRUE, col = "blue")
addWMA(n = 10, wts=1:n, on = 1, with.col = Cl, overlay = TRUE, col = "green")
addDEMA(n = 10, on = 1, with.col = Cl, overlay = TRUE, col = "pink")
addEVWMA(n = 10, on = 1, with.col = Cl, overlay = TRUE, col = "yellow")
addZLEMA(n = 10, ratio=NULL, on = 1, with.col = Cl, overlay = TRUE, col = "red")
n |
periods to average over |
wilder |
logical; use wilder? |
wts |
a vector of weights |
ratio |
a smoothing/decay ratio |
on |
apply to which figure (see below) |
with.col |
using which column of data (see below) |
overlay |
draw as overlay |
col |
color of MA |
see the appropriate base MA functions in TTR for more details and references.
A moving average indicator will be draw on the current chart. A chobTA object will be returned silently.
Jeffrey A. Ryan
see MovingAverages in TTR written by Josh Ulrich
addTA
## Not run:
addSMA()
addEMA()
addWMA()
addDEMA()
addEVWMA()
addZLEMA()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.