find.tchannel: Find most current enveloping lines of a given time series

Description Usage Arguments Value See Also Examples

View source: R/findlines.R

Description

Find most current enveloping lines of a given time series

Usage

1
find.tchannel(x, tolerance = 1.5, n = 3, pscore = (0.05)^2, pfit = 0.85)

Arguments

x

xts object representing a time series

tolerance

tolerance specification for important points, expressed as times the standard deviation

n

number of lines to to choose the best ones from

pscore

envelope score, defines how best the lines envelopes the time series

pfit

fit socre, defines how much the lines deviates from the extreme points it connects

Value

returns the trend channel object (of type class tchannel)

See Also

find_lines

Examples

1
2
3
4
5
6
7
x <- quantmod::getSymbols("^GSPC", auto.assign = FALSE)
x <- x["2016-01-01::2016-09-30"]
quantmod::chart_Series(x)
tchannel <- find.tchannel(x,1.1)
tchannel
quantmod::add_TA(tchannel$xlines$maxlines[[1]],on=1)
quantmod::add_TA(tchannel$xlines$minlines[[1]],on=1)

prodipta/techchart documentation built on Sept. 13, 2020, 2:51 p.m.