Hi,
Just wondering for the SMA and EMA in package TTR, is it possible to me to
code it so that, say if I need to calculate SMA (x, n=100), when the sample
size is less than 100, it will give me the SMA (x, k) where k is the sample
size of the data? Right now it only gives me an invalid n error.
Thanks!
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.