search for: chartseries

Displaying 20 results from an estimated 20 matches for "chartseries".

2011 Dec 22
1
Trying to use chartSeries in quantmod
...v", sep=",", header=F, nrows=261, skip=5, col.names=colnames) > library(quantmod) > data date price 1 2011-12-18 13.7825 2 2011-12-11 13.5500 ... ... ... 259 2007-01-07 10.8256 260 2006-12-31 10.8531 261 2006-12-24 10.8169 # Here's where I would like to use chartSeries from quantmod, but I'm stumped, so I try several different things > chartSeries(date, price, data=data) Error in try.xts(x, error = "chartSeries requires an xtsible object") : chartSeries requires an xtsible object > ?chartSeries > chartSeries(date, price, type="candl...
2010 Nov 14
0
problem with chartSeries
...:25:00 13816 13822 13816 13822 2010-10-27 09:30:00 13821 13822 13809 13816 2010-10-27 09:34:59 13816 13816 13811 13815 2010-10-27 09:40:00 13815 13816 13808 13810 2010-10-27 09:44:59 13810 13812 13804 13811 The below code gives me a line chart instead of candlestick. I can't figure out why??? chartSeries(x, TA = NULL, theme = chartTheme('black'), up.col = 'white', dn.col = 'tomato', type = "candlesticks", name = "EUR", minor.ticks=FALSE) the x object seems to have the right attributes (see below) > class(x) [1] "xts" &q...
2012 Jul 27
1
Working with quantmod chartSeries and plot.zoo
...ing little problems with all the packages I've been using. So what I want to accomplish is create one pdf sheet with three graphs and one correlation table. Attached is an example I created which is very similar to what I want to do but there are few things I would like to change. I'm using chartSeries in quantmod for the graphs and for the table I'm using textplot. Few questions: 1) Is it possible to remove the date in the upper right corner of the graphs? 2) Instead of the text Last xxxx (the green series) I would like to get the name of the series itself, e.g. Stock 1, is that doable? 3)...
2011 Oct 20
4
quantmod package
i am new to the quantmod package . so if the answer is trivial please excuse me. i want to study stock values within a day. i get current stock updates using getQuotes and then want to produce usual quantmod graphs with that values. also the graph should be able of adding technical indicators. please help. in addition it will be helpful if anyone suggests how to run that code continuously to get
2010 Aug 15
2
Adding colored background area to a time series plot
...to draw the polygon or rect, given that my scale is of the form "2008-01-02" rather than simply "2008"? Additionally, do I have to use polygon, even if I'm trying to drawing a rectangle, as was the case in the examples linked above? I'd like to be able to use this with chartSeries, rather than plot, but I thought it would be easiest to figure it out using plot first. Clearly that hasn't helped me. Thanks for any advice you can provide. James
2010 Nov 18
1
Accessing variables inside a namespace
...that data which if I look at the function code is stored in a variable called "atr" library(TTR) library(quantmod) data(ttrc) x <- subset(ttrc,select=c("Date","Open","High","Low","Close")) x.z <- read.zoo(x) x.xts <- as.xts(x.z) chartSeries(x.xts) addATR() Just so that I don't need to recalculate the same stuff again. I believe the data hasn't "expired" already. Thanks for your help. S
2011 Dec 07
1
nice time series viewer?
Hi all, I am looking for a nice time series grapher/viewer in R ... with the feature of scrolling, zooming, etc. Hopefully it could be of the quality at the report-generation-and-sending-to-boss level... Could anybody please give me some recommendations/pointers? Thanks a lot!
2016 Apr 09
1
Quantmod abline and axis configuration
...2) suppressPackageStartupMessages(require(googleVis)) require(quantmod) require(PerformanceAnalytics) require(xtsExtra) require(rCharts) Foa<-as.xts(read.zoo("fa.txt",col.names=c("Date","LAST"), sep="",dec=",", format="%d/%m/%Y")) chartSeries(Foa,theme="white",TA = c(addBBands(50,2), addBBands(100,2), addBBands(250,2), ylim(0,4000)) ) t=chartTheme() t$BBands$fill="#ff666633" reChart(theme="white") t$BBands$col=c('red','blue','green') t$BBands$col='blue' reChart(theme="t...
2011 Jul 26
1
intraday plot and gaps in data
...elow) which has gaps due to market opening and closing hours. I am trying to plot it, but the time gap is always visible in the plot. I tried converting data to xts, zoo, timeSeries and plotting it with different functions i.e. plot.xts, plot.zoo. The only way to make it work was with function 'chartSeries' in the quantmod package which excludes non existing data from the plot. I still would like to use the plot, plot.zoo or plot.xts functions if possible. I spent a lot of time looking through forums and could not find anything that would help. Is this possible at all? Thanks 2009-09-08 20:40:...
2011 May 05
1
quantmod's addTA plotting functions
...e's an example. test.addTA <- function(from = "2010-06-01") { getSymbols("^GSPC", from = from) GSPC.close <- GSPC[,"GSPC.Close"] GSPC.EMA.3 <- EMA(GSPC.close, n=3, ratio=NULL) GSPC.EMA.10 <- EMA(GSPC.close, n=10, ratio=NULL) chartSeries(GSPC.close, theme=chartTheme('white'), up.col="black", dn.col="black") addTA(GSPC.EMA.3, on = 1, col = "#0000ff") addTA(GSPC.EMA.10, on = 1, col = "#ff0000") # browser() } When I run this, GSPC.close always appears. But only GSPC.EMA...
2012 Sep 04
1
Producing a SMA signal when closing price is above the moving average for 3 days
...ma <- SMA(GE$GE.Close, n=50) # Simple Moving Average of the closing price GEsma[is.na(GEsma)] <- 50 # Make NA's to 50 so ifelse statement works correctly aboveSMA <- ifelse(GE$GE.Close > GEsma, 1, 0) # 1 when price is above 50 day moving average # 0 When below moving average chartSeries(GE) # Shows Price chart addSMA(n=50) # adds 50 day moving average to chart
2008 Apr 18
1
ts.plot() labeling x-axis
Hello, I have tried a few variants of a solution from the previous posts, but perhaps my syntax is wrong. I am using ts.plot(data_as_columns) and would like the label the x axis using some labels (in my case minutes after 9am). Any ideas how to use the plot params and the Axis function to accomplish this? Any help is very appreciated. Regards, Tom
2012 Oct 14
0
Asking help about drawing and saving candle chart automatically....
...e <- as.character(convdate) print(strdate) # make daily range daterange <- paste( strdate, "::", strdate, sep="" ) print(daterange) jpegname <- paste(strdate, ".jpeg", sep="") #### jpeg( filename=jpegname, width=1200, height=400 ) tryCatch(chartSeries(aa, subset=daterange, type='candlesticks', theme=chartTheme('white'))) #dev.list() #saveChart( 'jpeg' ) #### dev.off() # wait for user input cat("\n","Enter x","\n") # prompt y<-scan(n=1) } --------------------------------------------...
2011 Apr 29
1
Handling of irregular time series in lineChart
Hi, I realized that when I have irregular series to feed into lineChart, the interval of each point in the chart does not seem to take care of irregular time interval I specified in my input xts time series. But rather, lineChart seems to take each point as equal spaced time series. For example, I have the following code: library(quantmod) options(digits.sec=3) t0 <-
2010 Nov 21
1
abline(h=whatever) not working in candleChart() (in quantmod)?
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
2008 Mar 22
2
intraday OHLC plot
I want to create a open/high/low/last plot of intraday data. I try to use the function plotOHLC from the tsteries package. I create my own multiple time series and then try to plot it. raw Data Format (file eurusd2.csv): "Date (GMT)" "Open" "High" "Low" "Last" 17-03-2008 00:00:00 1,5764 1,5766 1,5747 1,5750 17-03-2008 00:05:00 1,5749 1,5750 1,5741
2011 Nov 20
2
Continuasly Compunded Returns with quantmod-data
Hey guys, i want to calculate the continuasly compounded returns for stock prices. Formula for CCR: R_t = ln(P_t/P_{t-1})*100 With R: First i have to modify the vectors, so that they have the same length and we start at the second observation. log(GOOG1[-1]/GOOG1[1:length(GOOG1)-1])*100 That does work with normal vectors. My Questions: 1) I want to use this for stock prices. so i
2018 Jan 18
0
Split charts with ggplot2, tidyquant
Hi Charlie, I am comfortable to put the data in any way that works best. Here are two possibilities: an xts and a data frame. library(quantmod) quantmod::getSymbols("SPY") # creates xts variable SPY SPYxts <- SPY[,c("SPY.Close","SPY.Volume")] SPYdf <- data.frame(Date=index(SPYxts),close=as.numeric(SPYxts$SPY.Close),
2011 May 07
2
Convenience-at-the-expense-of-clarity (was: quantmod's addTA plotting functions)
...t;) { >> getSymbols("^GSPC", from = from) >> GSPC.close<- GSPC[,"GSPC.Close"] >> GSPC.EMA.3<- EMA(GSPC.close, n=3, ratio=NULL) >> GSPC.EMA.10<- EMA(GSPC.close, n=10, ratio=NULL) >> chartSeries(GSPC.close, theme=chartTheme('white'), >> up.col="black", >> dn.col="black") >> addTA(GSPC.EMA.3, on = 1, col = "#0000ff") >> addTA(GSPC.EMA.10, on = 1, col = "#ff0000") >>...
2018 Jan 18
3
Split charts with ggplot2, tidyquant
Could you provide some information on your data structure (e.g., are the two time series in separate columns in the data)? The solution is fairly straightforward once you have the data in the right structure. And I do not think tidyquant is necessary for what you want. Best, Charlie -- Charles Redmon GRA, Center for Research Methods and Data Analysis PhD Student, Department of Linguistics