[R-SIG-Finance] quantmod: addTA is broken?
Michael Zak
zakdump at gmail.com
Sun Dec 14 14:23:46 CET 2008
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.
>>
More information about the R-SIG-Finance
mailing list