Files
OpenBB/website/content/api/common/ta/macd/_index.md
Colin Delahunty 0b33cb45f8 Adds auto yaml generation (#2587)
* Began working on docs creator

* Added fixes

* More

* More

* Adding autogen_try.py for OpenBB API doc generation

* OpenBB API docs gen try

* Fixed

* Added fixes

* Added fixes

* subs -> sub

* Updated docs

* Updated docs

Co-authored-by: Chavithra PARANA <chavithra@gmail.com>
2022-09-23 16:43:34 +01:00

1.2 KiB
Vendored

To obtain charts, make sure to add chart=True as the last parameter

Get underlying data

common.ta.macd(values: pandas.core.frame.DataFrame, n_fast: int = 12, n_slow: int = 26, n_signal: int = 9) -> pandas.core.frame.DataFrame

Moving average convergence divergence

Parameters
----------
values: pd.Series
    Values for calculation
n_fast : int
    Fast period
n_slow : int
    Slow period
n_signal : int
    Signal period
Returns
----------
pd.DataFrame
    Dataframe of technical indicator

Getting charts

common.ta.macd(data: pandas.core.series.Series, n_fast: int = 12, n_slow: int = 26, n_signal: int = 9, symbol: str = '', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True)

Plot MACD signal

Parameters
----------
data : pd.Series
    Values to input
n_fast : int
    Fast period
n_slow : int
    Slow period
n_signal : int
    Signal period
symbol : str
    Stock ticker
export : str
    Format to export data
external_axes : Optional[List[plt.Axes]], optional
    External axes (2 axes are expected in the list), by default None