Hi,

I wish to compute trading criteria only for past 10 days. That involves,
say, a 50 day moving average. The SMA function does not allow me to only
compute the 50 day moving average over the past 10 days, even if I have the
symbol series for the past 200 days!

getSymbols("AAPL")
SMA(AAPL, 10)

will compute the moving average for the entire series with 9 NAs. But that
is more expensive than computing only the last 10 moving averages,
necessary for my trading system. (this is just an example).

If I am mistaken, could you please let me know how? I believe that all the
TTR functions should be amended to compute the time series between a from
and to date.

      Gordon

	[[alternative HTML version deleted]]

