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

addMACD

Add Moving Average Convergence Divergence to Chart


Description

Add Moving Average Convergence Divergence indicator to chart.

Usage

addMACD(fast = 12, slow = 26, signal = 9, type = "EMA", histogram = TRUE, col)

Arguments

fast

fast period

slow

slow period

signal

signal period

type

type of MA to use. Single values will be replicated

histogram

include histogram

col

colors to use for lines (optional)

Details

See and 'MACD' in TTR for specific details and implementation references.

Value

A MACD indicator will be draw in a new window on the current chart. A chobTA object will be returned silently.

Author(s)

Jeffrey A. Ryan

References

see MACD in TTR written by Josh Ulrich

See Also

Examples

## Not run: 
addMACD()

## 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.