File: setTA.Rd

package info (click to toggle)
r-cran-quantmod 0.4.28-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 984 kB
  • sloc: makefile: 2
file content (60 lines) | stat: -rw-r--r-- 1,689 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
\name{setTA}
\alias{setTA}
\alias{unsetTA}
\alias{listTA}
\title{ Manage TA Argument Lists }
\description{
Used to manage the TA arguments used inside \code{chartSeries}
calls.
}
\usage{
setTA(type = c("chartSeries", "barChart", "candleChart"))

listTA(dev)
}
\arguments{
  \item{type}{ the function to apply defaults TAs to }
  \item{dev}{ the device to display TA arguments for }
}
\details{
\code{setTA} and \code{unsetTA} provide a simple
way to reuse the same TA arguments for multiple
charts.  By default all charting functions will be
set to use the current chart's defaults.

It is important to note that the \emph{current} device
will be used to extract the list of TA arguments to apply.
This is done with a call to listTA internally, and followed
by calls to setDefaults of the appropriate functions.

An additional way to set default TA arguments for subsequent
charts is via \code{setDefaults}. See the examples.
}
\value{
Called for its side-effect of setting the default
TA arguments to quantmod's charting functions.
}
\author{ Jeffrey A. Ryan }
\note{ 
Using \code{setDefaults} directly will require the vector
of default TA calls to be wrapped in a call to 
\code{substitute} to prevent unintended evaluations; \emph{OR}
a call to \code{listTA} to get the present TA arguments.  This last
approach is what \code{setTA} wraps.
}
\seealso{ \code{\link{chartSeries}},
          \code{\link{addTA}} }
\examples{
\dontrun{
listTA()
setTA()

# a longer way to accomplish the same
setDefaults(chartSeries,TA=listTA())
setDefaults(barCart,TA=listTA())
setDefaults(candleChart,TA=listTA())

setDefaults(chartSeries,TA=substitute(c(addVo(),addBBands())))
}
}
\keyword{ utilities }