I have a problem with the functions SMA and EMA from the package TTR.
I can run my code in RStudio without a problem, but when I would like to
compiled in sweave there is a error message: Could not find SMA (or EMA,
when i try it with this function).
Does someone know whats the problem? I have installed TTR a thousand
My code is:
ma.low <- as.xts(SMA(returns,50))
ma.high <- as.xts(SMA(returns,200))