visMovingAverage.RdVisualizing the trend of the stock by using moving average method
visMovingAverage(data, window, name)
| data | xts a time series object |
|---|---|
| window | A numeric vector of the size of the window (number of days) used in moving average calculation |
| name | a character vector of the name of the column to be used in moving average calculation |
A ggplot line plot of specific stock's historical prices and moving average prices
#> [1] "AAPL"visMA_AAPL <- visMovingAverage(AAPL, 300, 'AAPL.Close')