[R] quantmod ATR problem

From: Chris <chris_at_chrisbird.com>
Date: Wed, 19 Nov 2008 00:28:18 -0800 (PST)

Trying to plot ATR of time series using SMA using quantmod, plots fine with maType="EMA".
However, when I use maType="SMA" I get the following error:

Error in SMA(c(0, 0, 0, 0, 0, ... :

   unused arguments(s) (wilder = FALSE)
Calls: addATR -> ATR -> do.call -> SMA
Execution halted

The code I am using is:

addATR(n=20, wilder=FALSE, maType="SMA")       # does not work
addATR(n=20, maType="EMA")                              # works fine

Note, the problem still occurs if the wilder argument is modified or completely removed.
This is probably quite simply, but I am very new to [R] - any help would be appeciated.



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 19 Nov 2008 - 09:51:43 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 20 Nov 2008 - 07:30:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive