Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

setTA

Manage TA Argument Lists


Description

Used to manage the TA arguments used inside chartSeries calls.

Usage

setTA(type = c("chartSeries", "barChart", "candleChart"))

listTA(dev)

Arguments

type

the function to apply defaults TAs to

dev

the device to display TA arguments for

Details

setTA and 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 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 setDefaults. See the examples.

Value

Called for its side-effect of setting the default TA arguments to quantmod's charting functions.

Note

Using setDefaults directly will require the vector of default TA calls to be wrapped in a call to substitute to prevent unintended evaluations; OR a call to listTA to get the present TA arguments. This last approach is what setTA wraps.

Author(s)

Jeffrey A. Ryan

See Also

Examples

## Not run: 
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())))

## End(Not run)

quantmod

Quantitative Financial Modelling Framework

v0.4.18
GPL-3
Authors
Jeffrey A. Ryan [aut, cph], Joshua M. Ulrich [cre, aut], Wouter Thielen [ctb], Paul Teetor [ctb], Steve Bronder [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.