Learn R Programming

rtsplot (version 0.1.5)

rtsplot.ohlc: Create OHLC Plot

Description

Plot ohlc if dx is sufficient otherwise bars

Usage

rtsplot.ohlc(y, col = rtsplot.theme()$col.border)

Value

nothing

Arguments

y

xts object

col

color for bars, defaults to rtsplot.theme()$col.border

Examples

Run this code
y = rtsplot.fake.stock.data(50, ohlc=TRUE)
symbol = 'SPY'
	
 # plot
 layout(1)
 rtsplot(y, type = 'n')
 rtsplot.ohlc(y)
rtsplot.legend(symbol, 'black', y)

rtsplot.theme.set(legend.bg.col=grDevices::adjustcolor('blue', 25/255))
rtsplot.corner.label('Logo \uA9', x=1, y=-1, cex = 0.7, space='figure', col='blue')
rtsplot.theme.set(legend.bg.col = grDevices::adjustcolor('white', 200/255))

Run the code above in your browser using DataLab