On Nov 21, 2010, at 10:50 AM, David L. Van Brunt, Ph.D. wrote:
Hello, all--
I am having some fun playing with the graphing in quantmod-- very
nice! I am
writing a function to calculate (and hopefully plot) support and
resistance
lines, but the usual plot call of "abline(h=value)" does not seem to
work.
Here's my code:
require(quantmod)
AAPL<-getYahooData("AAPL")
candleChart(AAPL,subset="last 3 months",theme="white")
addMACD()
abline(h=290,col="red")
Looks to me that chartSeries is an S4 function that works on objects
of class chob. So try seeing if these widen your perspective :
?"chob-class"
?TA
?newTA
The same sequence works fine if I'm just using a plain vanilla
"plot" call,
however.
What am I missing? Do I need to call the line as a technical study
using
addTA?
That's what it looks like from here.
Not sure how to make a straight line constant doing that...
I'm sure it should be obvious, since my searching on google hasn't
turned up
anything. So I'm getting ready for a "face-palm" moment if anyone
can point
me in the right direction!
---------------------------------------
David L. Van Brunt, Ph.D.
mailto:dlvanbr...@gmail.com
trimmed the irrelevant material from another posting
.
David Winsemius, MD
West Hartford, CT
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.