Closed R-Hertel closed 8 years ago
The problem is with quantmod::Lo
and tickers that contain the pattern "LOW". This is a long-standing issue, as reported in quantmod issue 24.
Closing, since this is an issue in quantmod, not TTR.
Thank you for your quick and insightful reply.
You're welcome. Also note that, though ADX(HLC(issue))
does not throw an error, the results are incorrect. The ADX
function assumes the HLC
parameter contains High, Low, and Close prices, in that order. In this example, the first three columns of the result of HLC(issue)
are High, Open, High.
Dear Joshua,
While scanning some stocks I encountered a problem with the
TTR::BBands
function, which I use in connection withHLC()
. The problem occurs with tickers containing the letter sequence LOW (such as NYSE:LOW and NYSE:PLOW). Maybe the code gets confused by the multiple occurrence of "low" in the column names while searching for the low of the price.Here is an example:
The last command leads to the following error:
I'm not sure if the problem arises from
HLC()
or fromBBands()
, although I suspect that the former might be the culprit. Maybe it helps to point out that, for example,does not throw any error. I'm using TTR version 0.23-0, quantmod version 0.4-5 and R version 3.2.2 on ubuntu 14.04. Thanks for looking into this.
Cheers, Riccardo