techchart icon indicating copy to clipboard operation
techchart copied to clipboard

techchart::find.imppoints fails with an error due to not finding anything

Open SamoPP opened this issue 3 years ago • 0 comments

I am trying to see a very simple divergence between price series and RSI with n=3. Looks like techchart::find.imppoints can't find any imppoints for RSI3. What to do here? Reproducible ex maple below.

library(quantmod)
library(TTR)

SPX <- getSymbols("^GSPC", auto.assign=FALSE)
SPX.RSI3 <- RSI(Cl(SPX), n=3)
SPX.RSI3.ImpPoints.Maxima <- techchart::find.imppoints(SPX.RSI3)

subset <- "2022/"
chart_Series(SPX, subset=subset)
add_TA(SPX.RSI3)

R console log and traceback: > library(quantmod) > library(TTR) > > SPX <- getSymbols("^GSPC", auto.assign=FALSE) > SPX.RSI3 <- RSI(Cl(SPX), n=3) > SPX.RSI3.ImpPoints.Maxima <- techchart::find.imppoints(SPX.RSI3) Error in .rowNamesDF<-(x, value = value) : invalid 'row.names' length > traceback() 6: stop("invalid 'row.names' length") 5: .rowNamesDF<-(x, value = value) 4: row.names<-.data.frame(*tmp*, value = value) 3: row.names<-(*tmp*, value = value) 2: rownames<-(*tmp*, value = seq(1:NROW(z))) at supports.R#163 1: techchart::find.imppoints(SPX.RSI3)

SamoPP avatar Dec 28 '22 09:12 SamoPP