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

TA

Add Technical Indicator to Chart


Description

Functions to add technical indicators to a chart.

Details

The general mechanism to add technical analysis studies or overlays to a financial chart created with chartSeries.

Functionality marked with a ‘*’ is via the TTR package.

General TA charting tool functions:

  • addTAadd data as custom indicator

  • dropTAremove technical indicator

  • moveTAmove a technical indicator

  • swapTAswap two technical indicators

Current technical indicators include:

  • addADXadd Welles Wilder's Directional Movement Indicator*

  • addATRadd Average True Range *

  • addAroonadd Aroon Indicator *

  • addAroonOscadd Aroon Oscillator *

  • addBBands:add Bollinger Bands *

  • addCCIadd Commodity Channel Index *

  • addCMFadd Chaiken Money Flow *

  • addChADadd Chaiken Accumulation Distribution Line *

  • addChVoladd Chaiken Volatility *

  • addCMOadd Chande Momentum Oscillator *

  • addDEMAadd Double Exponential Moving Average *

  • addDPOadd Detrended Price Oscillator *

  • addEMAadd Exponential Moving Average *

  • addEMVadd Arm's Ease of Movement *

  • addEnvelopeadd Moving Average Envelope

  • addEVWMAadd Exponential Volume Weighted Moving Average *

  • addExpiryadd options or futures expiration lines

  • addKSTadd Know Sure Thing *

  • addLinesadd line(s)

  • addMACD:add Moving Average Convergence Divergence *

  • addMFIadd Money Flow Index *

  • addMomentumadd Momentum *

  • addOBVadd On-Balance Volume *

  • addPointsadd point(s)

  • addROC:add Rate of Change *

  • addRSIadd Relative Strength Indicator *

  • addSARadd Parabolic SAR *

  • addSMAadd Simple Moving Average *

  • addSMIadd Stochastic Momentum Index *

  • addTDIadd Trend Direction Index *

  • addTRIXadd Triple Smoothed Exponential Oscillator *

  • addVoadd Volume if available

  • addVolatilityadd volatility *

  • addWMAadd Weighted Moving Average *

  • addWPRadd Williams Percent R *

  • addZigZagadd Zig Zag *

  • addZLEMAadd ZLEMA *

See the individual functions for specific implementation and argument details. Details of the underlying TTR implementations can be found in TTR.

The primary changes between the add*** version of an indicator and the TTR base function is the absense of the data argument in the former.

Notable additions include on, with.col.

Value

Called for its side effects, an object to class chobTA will be returned invisibly. If called from the R command line the method will draw the appropriate indicator on the current chart.

Note

Calling any of the above methods from within a function or script will generally require them to be wrapped in a plot call as they rely on the context of the call to initiate the actual charting addition.

Author(s)

Jeffrey A. Ryan

References

Josh Ulrich - TTR package


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.