
Last chance! 50% off unlimited learning
Sale ends in
plot_ts(dt, type = "auto", col = "auto", lty = par("lty"), lwd = par("lwd"), pch = par("pch"), legend = c("topright", "topleft", "bottomright", "bottomleft", "n"), last_values = TRUE, main = "", ylim = "auto", xlim = "auto", time_range = "auto", resolution = "auto", log = par("ylog"), mar = par("mar"), xaxt = par("xaxt"), add = par("new"))
t_to_x(t)
data.table
with date/time index represented by first column. If OHLC detected then only candles plotted. Use lines
for the rest of dataplot
but 'candle'
supports. Default is 'l'
. 'h'
triggers adding zero to plot range'auto'
so colors generated automaticallyplot
'topright','topleft','bottomright','bottomleft'
or 'n'
to hide legend''
'HH:MM:SS/HH:MM:SS'
'auto','minute','hour','day','month','year','years'
. Default is 'auto'
par
par
times_series
on single plot.
As for OHLC series, only one can be plotted and should be passed as times_series
with 4 columns 'open','high','low','close'
.
add_last_values
,
add_legend
, distinct_colors
,
empty_plot
, hist_dt
,
lines_ohlc
,
lines_stacked_hist
,
multi_heatmap
, plot_table
time_series <- get_finam_data( 'SBER', '2014-01-10', '2014-08-13', period = '10min' )
plot_ts( time_series[ time %bw% '2014-08-13', list( time, open, high, low, close ) ] )
plot_ts( time_series[ time %bw% '2014-08-13', list( time, volume = volume / 1e6 ) ] , type = 'h' )
plot_ts( time_series[ time %bw% '2014-08', list( time, close ) ] )
plot_ts( time_series[ , list( time, close ) ] )
time_series <- get_finam_data( 'SBER', '2014-01-10', '2014-08-13', period = '10min' )
mar = par( 'mar' )
par( mar = c( 0, 4, 0, 4 ), xaxt = 'n' )
layout ( matrix( 1:(3 + 2) ), heights = c( 1, 4, 2, 2, 1 ) )
empty_plot()
plot_ts( time_series[ , list( time, open, high, low, close ) ] )
plot_ts( time_series[ , list( time, close ) ] )
par( xaxt = 's' )
plot_ts( time_series[ , list( time, vol = vol / 1e6 ) ], type = 'h' )
empty_plot()
par( mar = mar )
Run the code above in your browser using DataLab