Description Usage Arguments Value See Also Examples
Find most current enveloping lines of a given time series
1 | find.tchannel(x, tolerance = 1.5, n = 3, pscore = (0.05)^2, pfit = 0.85)
|
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 |
returns the trend channel object (of type class tchannel)
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.