Yes, series(MA[0]-MA[shift]) will get you the difference. Make sure that Lookback is >= shift.