addIndicator: Adds indicators to strategy

Description Usage Arguments Examples

View source: R/rules_indicators.R

Description

This indicator will be calculated each time when spread update coefs indicators must return data.frame or matrix or array

Usage

1
2
3
4
addIndicator(this, args, as, lookback, ...)

## S3 method for class 'modelStrategy'
addIndicator(this, args, as, lookback, ...)

Arguments

this

model

args

list, the first argument should be name, it should be equal to function (your indicator), other arguments of list will be passed to this function

as

character, local name of this indicator

lookback

numeric, how many points does it need to do calculation

...

addtional params

Examples

1
2
3
4
5
## Not run: 
addIndicator(this, args = list(name = BBands, HLC = quote(spread), n = 20, sd = 1), as = 'bb',
    lookback = 100)

## End(Not run)

Vitalic57/stratbuilder2pub documentation built on Dec. 18, 2019, 2:56 a.m.