plot_dts: Plot data.table time series

Description Methods

View source: R/plot_dts.R

Description

Plot data.table time series

Methods

plot_dts

Add data to be plotted.

$lines

Add lines with following arguments:

names vector of column names to plot
labels vector of labels if different from column names
type vector or single value, see lines
lty,pch,col,lwd,lend vector or single value, see par
bg vector or single value, see points
$candles

Add candles with following arguments:

ohlc vector of open, high, low and close names
timeframe candle timeframe in minutes for intraday candles
position relative to time position only 'end' supported
type 'barchart' or 'candlestick'
gap gap between candles in fraction of width
mono should all candles have same color?
col,col_up,col_flat,col_down colors
$limits
xlim vector of length two to limit plot area horizontally
ylim vector of length two to limit plot area vertically
tlim date or time vector of length two
time_range intraday time limit in format 'H:M:S/H:M:S'
$style

Change default plot options. Available options are:

grid
minute list(col,lty) minute vertical gridline color and line type
hour list(col,lty) hour vertical gridline color and line type
day list(col,lty) day vertical gridline color and line type
month list(col,lty) month vertical gridline color and line type
year list(col,lty) year vertical gridline color and line type
zero list(col,lty) zero horizontal gridline color and line type
time
grid logical should vertical gridlines be plotted?
resolution character auto, minute, hour, day, month, year or years
round numeric time axis rounding in minutes
visible logical should time axis be plotted?
value
grid logical should horizontal gridlines be plotted?
last logical should last values be plotted?
log logical should y axis be in logarithmic scale?
visible logical should y axis be plotted?
candle
auto logical shoud candles be automatically detected and plotted?
col list(mono,up,flat,down) colors
gap numeric gap between candles in fraction of width
mono logical should all candles have same color?
position character relative to time position only 'end' supported
type character 'candlestick' or 'barchart'
line
auto logical shoud lines be automatically detected and plotted?
legend
col list(background,frame) colors
horizontal logical should legend be horizontal?
inset numeric see legend
position character see legend
visible logical should legend be plotted?

QuantTools documentation built on Oct. 23, 2020, 7:54 p.m.