Returns the sum over the specified period.
i am using SUM in a strategy on a 1 tick chart with a defined dataseries assigning each occurance a value of 1. like this:
mydata.Set( 1 );
SUM (mydata, 6)[0]
printing the values to the output window the first value for the SUM is 6 but then each value after the first is one less going to an infinite negative number with each tick printed.
my understanding of SUM (mydata, 6)[0] is that it should always be 6...the sum of the last 6 periods of mydata using a 1 tick chart. basically the same as adding mydata[0] + mydata[1]+ mydata[2]+.......mydata[5]. i printed the values of mydata from [0] to [5] and all equal 1.
what am i missing?

Comment