Skip to content

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

@SamoPP

Description

@SamoPP

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions