library(quantmod) #install.package(quantmod)
library(plotly) #install.package(plotly)
library(Quandl)
#setting data
getSymbols("KRX:KOSPI", source='goolge') #KOSPI
KOSPI.data <- data.frame(apply(`KRX:KOSPI`,2,rev))
View(KOSPI.data)
candleChart(KOSPI.data, up.col = "black", dn.col = "red", theme = "white", subset = "2017-01-04/")
addSMA(n = c(20, 50, 200))
addBBands()
addMACD()
No comments:
Post a Comment