|
Error in get.current.chob() : improperly set or missing graphics device
#install.packages("quantmod")
rm(list=ls())
library(quantmod)
getSymbols(Symbols="^SSEC",from="1990-01-01",to="2013-6-30",src="yahoo")
#第一个参数表示股票号
# head(SSEC) #查看前6行
class(SSEC)
ccandleChart(x=SSEC["2012"],theme="white")
avg<-function(x) rowMeans(HLC(x))
AvgPrice<-newTA(FUN=avg,col="white",legend.name = "AvgPrice")
AvgPrice(on=1)
#help(package="quantmod")
|
|