TAIndicator: Technical analysis indicator (R6 class constructor)

TAIndicatorR Documentation

Technical analysis indicator (R6 class constructor)

Description

An R6 class for technical analysis indicator(s). Its purpose is to facilitate calculations on time-series of data. The fields specify the 'func' and parameters for the calculation(s). The indicator(s) can be constructed with the function 'taFactory()'.

Super class

TDI::baseTDI -> TAIndicator

Public fields

label

Unique label for the indicator.

method

Indicator calculation method.

columns

List with input data column(s).

args

Arguments for the calculation.

Methods

Public methods

Inherited methods

Method new()

Object constructor for class 'taIndicator'.

Usage
TAIndicator$new(label, method, columns, args = list())
Arguments
label

Label for the indicator.

method

Method to calculate the indicator.

columns

List of input data column(s).

args

List of arguments for the indicator function.

Returns

An object of class 'taIndicator'.


Method calculate()

Calculate the indicator for the time series.

Usage
TAIndicator$calculate(x)
Arguments
x

Time-series object with input data.

Returns

xts Time-serie with the indicator(s).


n0Trader/TDI documentation built on July 30, 2023, 7:48 p.m.