I'm trying to add the volume of the three previous bars (not
including the current one) in my backtest.
  
If I sum them up "manually" I get one value:
  
VolumeSumA = Volume[i-1] + Volume[i-2] + Volume[i-3];
  
But when I try using Sum and Ref to do it I get a different value for
some reason.
  
VolumeSumB = Sum(Ref(Volume, -1), 3);
  
But VolumeSumA != VolumeSumB.
  
What should I be using for Sum and Ref to get it to work properly and
equal VolumeSumA above?