首页 > 其他 > 详细

使用R绘股票的蜡烛线

时间:2016-11-27 20:28:13      阅读:207      评论:0      收藏:0      [点我收藏+]
library(quantmod)
getSymbols("GS")
candleChart(GS,multi.col=TRUE,theme=‘white‘)
candleChart(GS,multi.col=FALSE,theme=‘white‘,subset=‘2016-01-01::2016-05-01‘)
addMACD()

技术分享

source(‘/r/qserver.R‘)
h<-open_connection("127.0.0.1",5001,"testusername:testpassword")
res<-execute(h,"select date,Open:o,High:h,Low:l,Close:c,volume:v from daily where sym=`601006,date >2016.01.01")
resxts <-xts(res[,-1], order.by=res[,‘date‘])
candleChart(resxts,multi.col=FALSE,theme=‘white‘,up.col=‘red‘,dn.col=‘green‘,name=‘大秦铁路‘)
addMACD()
addRSI()

技术分享

使用R绘股票的蜡烛线

原文:http://growtotomorrow.blog.51cto.com/12220652/1877052

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!