So here is a ggplot . This is a bit more active, but offers more sophisticated formatting options.
library(quantmod) sp500 <- getSymbols("^GSPC", from="2015-01-01", auto.assign=FALSE) sp500 <- Cl(sp500) # extract close sp500 <- merge(sp500, dailyReturn(sp500)) # add daily returns sp500 <- merge(lag(Cl(sp500),1), sp500) # merge with close lagged by 1 day names(sp500) <- c("ymin", "ymax", "return") library(ggplot2) library(scales) df <- with(sp500, data.frame(xmin=c(lag(index(sp500),1)), xmax=index(sp500), ymin, ymax, return)) df$status <- with(df,ifelse(return>0.01,"up",ifelse(return< -0.01,"down","neutral"))) ggplot(df) + geom_segment(aes(x=xmin, xend=xmax, y=ymin, yend=ymax, color=status)) + scale_color_manual(values=c(up="green", down="red", neutral="grey50"), breaks=c("up","down"), labels=c("Gain > 1%", "Loss > 1%")) + scale_x_date(breaks=date_breaks("months"), labels=date_format("%b"))+ labs(x=NULL, y="Closing Price", title="S&P 500") + theme(panel.background =element_rect(fill="black"), panel.grid = element_blank())

As with the other answer, the basic idea is to draw color-coded segments based on the magnitude of the gain / loss. Therefore, we start by extracting closing prices, adding a return column, and then adding another closed price column that is 1 day late. Then we create data.frame from this with two date columns also 1 day behind. Then add a ( status ) column to indicate if the gain / loss was> 1%. Then we use it to control geom_segment(...) , color-coded status . In the call to scale_color_manual(...) we set the colors to red and green and exclude the neutral color from the legend. The rest is all formatting.