Description Usage Arguments Value Examples
Find supports and resitance for a time series
1 2 | find.pivots(x, type = c("SR", "FIB"), tolerance = 0.02, strength = 3,
maxline = 10, lookback = 20)
|
x |
xts object, or vector, representing a time series |
type |
either FIB (Fibonacci) or SR. SR is based on best fit lines of multiple peaks and troughs |
tolerance |
threshold for percentage change or vol multiple for extreme points |
strength |
minimum number of extreme points defining a support |
maxline |
maximum number of support/ resistance lines to return |
lookback |
Used for volatility dependent adaptive threshold |
support/ resistance object (object of class supports)
1 2 3 4 5 6 7 8 | x <- quantmod::getSymbols("^GSPC", auto.assign = FALSE)
x <- x["2015/"]
sups <- find.pivots(x, type = "FIB")
summary(sups)
sups <- find.pivots(x, type = "SR", strength = 5)
summary(sups)
quantmod::chart_Series(x)
quantmod::add_TA(sups$lines[[1]],on=1, lty=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.