Funtcion SMA and EMA not found in sweave

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Funtcion SMA and EMA not found in sweave

rami43
Hi
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
times....
My code is:
ma.low <- as.xts(SMA(returns,50))
ma.high <- as.xts(SMA(returns,200))