Hi,
Not tested, what about this ?
CumVolume = Sum(Volume,4) - Sum(Volume,1);
Best regards
Le 05/03/2010 17:43, davemabe2000 a écrit :
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?