rtsplot.lines {rtsplot} | R Documentation |
Add lines to time series plot
Description
Add lines to time series plot
Usage
rtsplot.lines(y, type = "l", col = graphics::par("col"), ...)
Arguments
y |
|
type |
line type, defaults to 'l', for more info see |
col |
color, defaults to par('col') |
... |
additional parameters to the |
Value
nothing
Examples
y = rtsplot.fake.stock.data(1000)
symbol = 'SPY'
# moving average
sma = TTR::SMA(y, 250)
# plot
layout(1)
rtsplot(y, type = 'l', col='black')
rtsplot.lines(sma, col='blue', lwd=1.5)
rtsplot.legend(c(symbol, 'SMA(250)'), 'black,blue', list(y,sma))
[Package rtsplot version 0.1.5 Index]