First you load the data from the package
library(mladv) data(SSI_data) head(SSI_data,3)
With the data_set, we can convert the raw market data into different bars such as time bars or volume bars as examples below with SSI_data
volume6000 <- volumebarr(SSI_data, 15000) head(volume6000)
minute_bar <- timebar(SSI_data, "minute") head(minute_bar)
We can still use functions from popular packages such as quantmod or ggplot2 with the return data.frame
library(xts) library(quantmod) minute_plot <- xts(minute_bar[,2:6], order.by=minute_bar$Date)
candleChart(minute_plot, theme="white", multi.col=T, name="Minute bar chart")
"He who gives up [code] safety for [code] speed deserves neither." (via)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.