刚才在http://faculty.chicagobooth.edu/ruey.tsay/teaching/introTS/找到了ohlc.R, ma.R的代码,这是作者自己写得,所以直接运行肯定不行,所以应该在studio中运行以下代码
"ohlc_plot" <- function(datamat,title="Time",xl="",yl=""){
# Produce plot for daily stock prices: open, high, low, and close. (in order)
# datamat is the data matrix.
# This function was downloaded from Jussi Klemela's book web page and
# modified.
#
if(!is.matrix(datamat))da=as.matrix(datamat)