[R] fSeries Technical Analysis rsiTA problem

Mulholland, Tom Tom.Mulholland at dpi.wa.gov.au
Wed Apr 20 04:42:33 CEST 2005


What does str(tsx) give?

So you are feeding in something the function has no idea about.

Try rsiTA(tsx at Data,14)

Tom

> -----Original Message-----
> From: Neuro LeSuperHéros [mailto:neuro3000 at hotmail.com]
> Sent: Wednesday, 20 April 2005 9:42 AM
> To: Mulholland, Tom; r-help at stat.math.ethz.ch
> Subject: RE: [R] fSeries Technical Analysis rsiTA problem
> 
> 
> Nope, its not that.
> 
> I only have one column in there.  So
> 
> >rsiTA(tsx[,2],14)
> Error in "[.timeSeries"(tsx, , 2) : subscript out of bounds
> 
> I get the orginal error with:
> 
> >rsiTA(tsx[,1],14)
> Error in "[.timeSeries"(close, 1:(length(close) - 1)) :
>         only 0's may be mixed with negative subscripts
> 
> Thanks for the answer anyways.
> 
> 
> 
> >From: "Mulholland, Tom" <Tom.Mulholland at dpi.wa.gov.au>
> >To: Neuro LeSuperHéros 
> <neuro3000 at hotmail.com>,<r-help at stat.math.ethz.ch>
> >Subject: RE: [R] fSeries Technical Analysis rsiTA problem 
> Date: Wed, 20 Apr 
> >2005 09:23:03 +0800
> >
> >Should you be using rsiTA(tsx[,2],14). If you look at the 
> function you will 
> >see it is expecting just the values you want in the calculation.
> >
> >If you give it a matrix it treats the whole matrix as being 
> price data.
> >
> >Tom
> >
> > > -----Original Message-----
> > > From: r-help-bounces at stat.math.ethz.ch
> > > [mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Neuro
> > > LeSuperHéros
> > > Sent: Wednesday, 20 April 2005 8:58 AM
> > > To: r-help at stat.math.ethz.ch
> > > Subject: [R] fSeries Technical Analysis rsiTA problem
> > >
> > >
> > > fSeries Technical Analysis rsiTA problem
> > >
> > > Hello,
> > >
> > > I'm trying to use the rsiTA() function but keep getting 
> this error:
> > >
> > > >rsiTA(tsx,14)
> > > Error in "[.timeSeries"(close, 1:(length(close) - 1)) :
> > >         only 0's may be mixed with negative subscripts
> > >
> > > Here's is the first three lines of my data:
> > > >tsx[1:3,]
> > >                                   close
> > > 2004-04-18 20:00:00 8702.82
> > > 2004-04-19 20:00:00 8602.98
> > > 2004-04-20 20:00:00 8573.05
> > >
> > > I have 250 days of data.
> > >
> > > Here's the class
> > > >class(tsx)
> > > [1] "timeSeries"
> > > attr(,"package")
> > > [1] "fBasics"
> > >
> > > And here's my version:
> > >
> > > >version
> > >          _
> > > platform i386-pc-mingw32
> > > arch     i386
> > > os       mingw32
> > > system   i386, mingw32
> > > status
> > > major    2
> > > minor    1.0
> > > year     2005
> > > month    04
> > > day      18
> > > language R
> > >
> > > I did load the libraries
> > > library(fSeries)
> > > library(fBasics)
> > >
> > > Regards,
> > >
> > > ______________________________________________
> > > R-help at stat.math.ethz.ch mailing list
> > > https://stat.ethz.ch/mailman/listinfo/r-help
> > > PLEASE do read the posting guide!
> > > http://www.R-project.org/posting-guide.html
> > >
> 
> 
>




More information about the R-help mailing list