quantmod: addTA is broken?
Michael, It's hard to speculate without knowing what the data you have looks like. Can you send the output of class(CottonSpreadsheet) colnames(CottonSpreadsheet) ? Also, did you run with debug(addTA)? You can probably narrow down the problem by stepping through the function yourself. Brian
On Sun, 2008-12-14 at 14:23 +0100, Michael Zak wrote:
You're absolutely right. I gave you a wrong example. Let's say I have OHLC data from Cotton over the last 80 days. In a spreadsheet I got from a client the computed EMA values for cotton's daily high. So I import the computed values (the last 80) in R like this: require(quantmod) CottonSpreadsheet <- read.table(...) CottonSpreadsheet <- last(CottonSpredsheet, 80) OHLC <- last(Cotton, 80) chartSeries(OHLC, type = "bars") addTA(CottonSpeadsheet) Now I got this error message: Fehler in tav * 0.975 : nicht-numerisches Argument f?r bin?ren Operator Zus?tzlich: Warning message: In merge.zoo(lchob at xdata, ta, join = "left", retside = c(FALSE, : Index vectors are of different classes: POSIXt POSIXt integer integer I get the chartSeries(), but without the added addTA. I don't know why this first line of the error message is in German. I hope you can help me anyway. Thank you, Michael On 14.12.2008, at 13:40, Gabor Grothendieck wrote:
That's a warning message, not an error message. This suppresses it: suppressWarnings(plot(addTA(min55, on = 1))) On Sun, Dec 14, 2008 at 5:14 AM, Michael Zak <zakdump at gmail.com> wrote:
Hi there
I have here some financial charts which I did a couple of months
ago with
quantmod. Today, I recharted my data with chartSeries(), which
works fine.
As soon as I add some indicators with addTA() I get a error message.
For example:
require(quantmod)
require(TTR)
getSymbols("YHOO")
chartSeries(YHOO)
min55 <- runMin(YHOO$YHOO.Low, 55)
addTA(min55, on = 1)
I get this message:
Warning messages:
1: In merge.zoo(lchob at xdata, ta, join = "left", retside = c(FALSE, :
Index vectors are of different classes: POSIXt POSIXt integer integer
How can I solve this?
Thank you, Michael
_______________________________________________ R-SIG-Finance at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. -- If you want to post, subscribe first.
_______________________________________________ R-SIG-Finance at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. -- If you want to post, subscribe first.