Compute and display overbought and oversold regions
plotOBOS(symbol, n = 50, type = c("sma", "ema", "zlema", "hma"),
years = 1, blue = TRUE, current = TRUE, title = symbol,
ticks = TRUE, axes = TRUE)
A (required) character string for stock symbol, or
alternatively a xts
or zoo
object with data
An optional integer for the moving average length, defaults to 50
An optional character string for the type of moving average; currently supported are ‘SMA’, ‘EMA’, ‘ZLEMA’, and ‘HMA’.
An optional numeric or integer value for the number of years of data to display, defaults to one
An optional boolean determining whether blue or gray tones are used, defaults to true implying blue tones
An optional boolean determining whether the current date is the end date
An optional character string for the plot title, defaults to the symbol
An optional boolean indicating whether ticks are plotted,
passed on to plot.xts
, defaults to true
An optional boolean indicating whether axes are plotted,
passed on to plot.xts
, defaults to true
NULL
as the function is invoked for the side effect of
the plot
This function computes a smoothed version of the price using a moving average (with one of several possible methods) as well as a standard deviation band, and displays one and two standard deviations around the smoothed price.